/** * Constructor */ public function __construct() { parent::__construct(); if (class_exists('WC_Subscriptions_Order')) { add_action('scheduled_subscription_payment_' . $this->id, array($this, 'scheduled_subscription_payment'), 10, 3); add_filter('woocommerce_subscriptions_renewal_order_meta_query', array($this, 'remove_renewal_order_meta'), 10, 4); add_action('woocommerce_subscriptions_changed_failing_payment_method_' . $this->id, array($this, 'update_failing_payment_method'), 10, 3); } if (class_exists('WC_Pre_Orders_Order')) { add_action('wc_pre_orders_process_pre_order_completion_payment_' . $this->id, array($this, 'process_pre_order_release_payment')); } }
/** * Constructor. */ public function __construct() { parent::__construct(); if (class_exists('WC_Subscriptions_Order')) { add_action('woocommerce_scheduled_subscription_payment_' . $this->id, array($this, 'scheduled_subscription_payment'), 10, 2); add_action('woocommerce_subscription_failing_payment_method_updated_' . $this->id, array($this, 'update_failing_payment_method'), 10, 2); add_action('wcs_resubscribe_order_created', array($this, 'delete_resubscribe_meta'), 10); // Allow store managers to manually set Simplify as the payment method on a subscription add_filter('woocommerce_subscription_payment_meta', array($this, 'add_subscription_payment_meta'), 10, 2); add_filter('woocommerce_subscription_validate_payment_meta', array($this, 'validate_subscription_payment_meta'), 10, 2); } if (class_exists('WC_Pre_Orders_Order')) { add_action('wc_pre_orders_process_pre_order_completion_payment_' . $this->id, array($this, 'process_pre_order_release_payment')); } add_filter('woocommerce_simplify_commerce_hosted_args', array($this, 'hosted_payment_args'), 10, 2); add_action('woocommerce_api_wc_addons_gateway_simplify_commerce', array($this, 'return_handler')); }