mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Add update product handler
This commit is contained in:
parent
01ab5d6003
commit
50d12479b8
4 changed files with 105 additions and 7 deletions
|
@ -164,7 +164,7 @@ class SubscriptionModule implements ModuleInterface {
|
|||
assert($subscriptions_api_handler instanceof SubscriptionsApiHandler);
|
||||
|
||||
if ( $product->meta_exists( 'ppcp_subscription_product' ) && $product->meta_exists( 'ppcp_subscription_plan' ) ) {
|
||||
$subscriptions_api_handler->update_product();
|
||||
$subscriptions_api_handler->update_product($product);
|
||||
$subscriptions_api_handler->update_plan();
|
||||
return;
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ class SubscriptionModule implements ModuleInterface {
|
|||
$subscriptions_api_handler->create_product($product);
|
||||
}
|
||||
|
||||
if ( $product->get_meta( 'ppcp_subscription_product' ) && ! $product->meta_exists( 'ppcp_subscription_plan' ) ) {
|
||||
if ( $product->meta_exists( 'ppcp_subscription_product' ) && ! $product->meta_exists( 'ppcp_subscription_plan' ) ) {
|
||||
$subscriptions_api_handler->create_plan($product);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue