Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LMNTL/451915dc19f40bfd653a513407a18ddf to your computer and use it in GitHub Desktop.
Save LMNTL/451915dc19f40bfd653a513407a18ddf to your computer and use it in GitHub Desktop.
don't cancel memberships when woocommerce orders go on hold
// don't cancel memberships when woocommerce orders go on hold
function my_pmpro_woocommerce_on_hold_keep_membership()
{
remove_action( 'woocommerce_subscription_status_on-hold', 'pmprowoo_cancelled_subscription', 10, 1 );
remove_action( 'woocommerce_subscription_status_on-hold_to_active', 'pmprowoo_activated_subscription', 10, 1 );
}
add_action('init', 'my_pmpro_woocommerce_on_hold_keep_membership');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment