Check if a Payment Gateway Support Refunds, Subscriptions or Pre-orders

Check if a payment gateway supports refundssubscriptions or pre-orders by looking at gateway code.

Simplify Commerce example ↑ Back to top

In 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.

WooCommerce - the most customizable eCommerce platform for building your online business.

Back to the top