Created
January 2, 2019 19:09
-
-
Save NickGreen/4c9cd8f7a6d2f8971e6cad7ef510b43d to your computer and use it in GitHub Desktop.
Run code when sub status changes to pending cancel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('woocommerce_subscription_status_updated', 'test_func', 100, 3); | |
function test_func($subscription, $new_status, $old_status) { | |
if( 'pending-cancel' == $new_status ) { | |
error_log( 'In ' . __FUNCTION__ . '(), status changed to = ' . var_export( $new_status, true ) ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment