mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Check 'sold individually' option on product save if ppcp subscription is active
This commit is contained in:
parent
cf77c37d69
commit
47e6b8d281
1 changed files with 4 additions and 0 deletions
|
@ -80,6 +80,10 @@ class PayPalSubscriptionsModule implements ModuleInterface {
|
|||
return;
|
||||
}
|
||||
|
||||
if ( $product->get_meta( '_ppcp_enable_subscription_product', true ) === 'yes' ) {
|
||||
update_metadata( 'post', $product_id, '_sold_individually', 'yes', 'no' );
|
||||
}
|
||||
|
||||
$subscriptions_api_handler = $c->get( 'paypal-subscriptions.api-handler' );
|
||||
assert( $subscriptions_api_handler instanceof SubscriptionsApiHandler );
|
||||
$this->update_subscription_product_meta( $product, $subscriptions_api_handler );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue