Created
April 25, 2014 14:23
-
-
Save messica/11291332 to your computer and use it in GitHub Desktop.
Cancel subscription on billing failure
This file contains 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 | |
// Cancel membership account on billing failure | |
function my_pmpro_subscription_payment_failed($old_order) { | |
pmpro_changeMembershipLevel(0, $old_order->user_id); | |
} | |
add_action('pmpro_subscription_payment_failed', 'my_pmpro_subscription_payment_failed'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment