mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Fix subscriptions product class not found
This commit is contained in:
parent
30c1f61f30
commit
7c4605d39b
1 changed files with 6 additions and 1 deletions
|
@ -558,8 +558,13 @@ class SubscriptionModule implements ModuleInterface {
|
|||
*/
|
||||
function( $variation_id ) use ( $c ) {
|
||||
$wcsnonce_save_variations = wc_clean( wp_unslash( $_POST['_wcsnonce_save_variations'] ?? '' ) );
|
||||
|
||||
$subscriptions_helper = $c->get('subscription.helper');
|
||||
assert($subscriptions_helper instanceof SubscriptionHelper);
|
||||
|
||||
if (
|
||||
! WC_Subscriptions_Product::is_subscription( $variation_id )
|
||||
!$subscriptions_helper->plugin_is_active()
|
||||
|| ! WC_Subscriptions_Product::is_subscription( $variation_id )
|
||||
|| ! is_string( $wcsnonce_save_variations )
|
||||
|| ! wp_verify_nonce( $wcsnonce_save_variations, 'wcs_subscription_variations' )
|
||||
) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue