Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't Cancell Membership when WooCommerce Subscription is OnHold #95

Open
contemplate opened this issue Jun 13, 2018 · 4 comments
Open

Comments

@contemplate
Copy link
Contributor

Every time this plugin is updated I go in and comment out this line:

add_action( "woocommerce_subscription_status_on-hold", "pmprowoo_cancelled_subscription", 10 );

Most subscriptions are On-Hold if there is a payment issue and the system will automatically be retrying and many times be successful after a few times and change the status to active. If not it changes the subscription to "expired" I believe which is fine then to have the membership removed. Almost all of my clients don't want their customers losing access during the On-Hold status.

Is there a way we can make this optional?

@ideadude
Copy link
Member

This seems reasonable. I wonder if there is consensus on this from PMPro WC users. Could make sense to add it as an option. We're kind of compiling a lot of potential options/etc based on how people are using PMPro and WC together.

In the meantime, you could remove_action in some custom code for now. So add this to a custom function so you don't have to edit the plugin file each time.

function init_disable_pmprowoo_cancel_on_hold() {
    remove_action( "woocommerce_order_status_on_hold", "pmprowoo_cancel_membership_from_order" );
}
add_action( 'init', 'init_disable_pmprowoo_cancel_on_hold' );

@contemplate
Copy link
Contributor Author

Thanks @ideadude

Yes making an options screen to decide which WC Subscription statuses trigger addition or removal of membership would be amazing!! More and more I'm switching over to allows WC Subscription manage all payments but need it to play nicely with PMPro, thus all the pull requests here ;)

I currently have about 5 clients on a PMPro + WC + WC Subscriptions setup with more coming. They all want this turned off. I'll implement this function for now. Thanks!

@ninjaval
Copy link

ninjaval commented Sep 4, 2018

I'm having the issue where I want to prevent 'On-hold' subscription status members from having Paid Memberships Pro access. Right now we're manually adding in customers from an old membership platform. When we add members manually they are set to a manually renew. So when a customer doesn't pay they are on hold and still have access, which is a loophole for free content. Hope more options for this come soon!

@JarrydLong
Copy link
Contributor

The functionality to cancel or remove a membership level was implemented in the PMPro Woocommerce Add On Version 1.7.4

Removing this functionality can be done by following Jason's suggestion for the time being.

This seems reasonable. I wonder if there is consensus on this from PMPro WC users. Could make sense to add it as an option. We're kind of compiling a lot of potential options/etc based on how people are using PMPro and WC together.

In the meantime, you could remove_action in some custom code for now. So add this to a custom function so you don't have to edit the plugin file each time.

function init_disable_pmprowoo_cancel_on_hold() {
    remove_action( "woocommerce_order_status_on_hold", "pmprowoo_cancel_membership_from_order" );
}
add_action( 'init', 'init_disable_pmprowoo_cancel_on_hold' );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants