Add `woocommerce_update_options_payment_gateways_` action

This commit is contained in:
Fernando Marichal 2022-02-04 10:22:52 -03:00
parent 178db4e789
commit 22b887fb20
4 changed files with 6 additions and 0 deletions

View File

@ -64,6 +64,7 @@ class WC_Gateway_BACS extends WC_Payment_Gateway {
); );
// Actions. // Actions.
add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'add_admin_options_tracking' ) );
add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) ); add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );
add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'save_account_details' ) ); add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'save_account_details' ) );
add_action( 'woocommerce_thankyou_bacs', array( $this, 'thankyou_page' ) ); add_action( 'woocommerce_thankyou_bacs', array( $this, 'thankyou_page' ) );

View File

@ -41,6 +41,7 @@ class WC_Gateway_Cheque extends WC_Payment_Gateway {
$this->instructions = $this->get_option( 'instructions' ); $this->instructions = $this->get_option( 'instructions' );
// Actions. // Actions.
add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'add_admin_options_tracking' ) );
add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) ); add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );
add_action( 'woocommerce_thankyou_cheque', array( $this, 'thankyou_page' ) ); add_action( 'woocommerce_thankyou_cheque', array( $this, 'thankyou_page' ) );

View File

@ -41,6 +41,8 @@ class WC_Gateway_COD extends WC_Payment_Gateway {
$this->enable_for_methods = $this->get_option( 'enable_for_methods', array() ); $this->enable_for_methods = $this->get_option( 'enable_for_methods', array() );
$this->enable_for_virtual = $this->get_option( 'enable_for_virtual', 'yes' ) === 'yes'; $this->enable_for_virtual = $this->get_option( 'enable_for_virtual', 'yes' ) === 'yes';
// Actions.
add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'add_admin_options_tracking' ) );
add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) ); add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );
add_action( 'woocommerce_thankyou_' . $this->id, array( $this, 'thankyou_page' ) ); add_action( 'woocommerce_thankyou_' . $this->id, array( $this, 'thankyou_page' ) );
add_filter( 'woocommerce_payment_complete_order_status', array( $this, 'change_payment_complete_order_status' ), 10, 3 ); add_filter( 'woocommerce_payment_complete_order_status', array( $this, 'change_payment_complete_order_status' ), 10, 3 );

View File

@ -70,6 +70,8 @@ class WC_Gateway_Paypal extends WC_Payment_Gateway {
$this->description = trim( $this->description ); $this->description = trim( $this->description );
} }
// Actions.
add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'add_admin_options_tracking' ) );
add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) ); add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );
add_action( 'woocommerce_order_status_processing', array( $this, 'capture_payment' ) ); add_action( 'woocommerce_order_status_processing', array( $this, 'capture_payment' ) );
add_action( 'woocommerce_order_status_completed', array( $this, 'capture_payment' ) ); add_action( 'woocommerce_order_status_completed', array( $this, 'capture_payment' ) );