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

Subscription status not updated if admin reactivates a WooCommerce subscription #25

Closed
rvdsteege opened this issue Nov 4, 2022 · 1 comment · Fixed by #26
Closed
Assignees
Labels

Comments

@rvdsteege
Copy link
Member

rvdsteege commented Nov 4, 2022

While testing for #14, I discovered that a Pronamic subscription is not updated correctly and the status stays 'Cancelled' instead of 'Active' when an admin reactivates a WooCommerce subscription by changing the status from 'Pending cancellation' to 'Active'.

@rvdsteege rvdsteege added the bug label Nov 4, 2022
@rvdsteege rvdsteege self-assigned this Nov 4, 2022
@rvdsteege
Copy link
Member Author

rvdsteege commented Nov 4, 2022

The issue seems to be caused by hooking into the earlier save_post_shop_subscription action, instead of the later save_post action which is used by WooCommerce Subscriptions.

add_action( 'save_post', __CLASS__ . '::save_subscription_meta', 11 );

Source: https://github.com/pronamic/woocommerce-subscriptions/blob/50b02db3314ce937e9a670b4215fa4cced7652cf/vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php#L90

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

Successfully merging a pull request may close this issue.

1 participant