Add event tracking to `Payment methods` list

This commit is contained in:
Fernando Marichal 2022-02-04 14:57:29 -03:00
parent 4cd6d31839
commit 59b4c806f6
1 changed files with 2 additions and 0 deletions

View File

@ -3086,6 +3086,7 @@ class WC_AJAX {
continue;
}
$enabled = $gateway->get_option( 'enabled', 'no' );
$gateway->add_admin_options_tracking();
if ( ! wc_string_to_bool( $enabled ) ) {
if ( $gateway->needs_setup() ) {
@ -3099,6 +3100,7 @@ class WC_AJAX {
$gateway->update_option( 'enabled', 'no' );
}
do_action( 'woocommerce_update_options' );
wp_send_json_success( ! wc_string_to_bool( $enabled ) );
wp_die();
}