Check if a payment gateway supports refunds, subscriptions or pre-orders by looking at gateway code.
Note: This is a Developer level doc. If you are unfamiliar with code/templates and resolving potential conflicts, select a WooExpert or Developer for assistance. We are unable to provide support for customizations under our Support Policy.
Simplify Commerce example
↑ Back to topIn case you should search for $this->supports
, as shown in the example below from the Simplify Commerce gateway:
class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway { /** * Constructor */ public function __construct() { $this->id = 'simplify_commerce'; $this->method_title = __( 'Simplify Commerce', 'woocommerce' ); $this->method_description = __( 'Take payments via Simplify Commerce - uses simplify.js to create card tokens and the Simplify Commerce SDK. Requires SSL when sandbox is disabled.', 'woocommerce' ); $this->has_fields = true; $this->supports = array( 'subscriptions', 'products', 'subscription_cancellation', 'subscription_reactivation', 'subscription_suspension', 'subscription_amount_changes', 'subscription_payment_method_change', 'subscription_date_changes', 'default_credit_card_form', 'refunds', 'pre-orders' );
If you don’t find $this->supports
, means that the gateway not accept refunds, subscripts or pre-orders.