mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 16:24:33 +08:00
Add subscriptions mode selector
This commit is contained in:
parent
b1091765dc
commit
ee425588bf
8 changed files with 39 additions and 17 deletions
|
@ -147,13 +147,13 @@ class SubscriptionModule implements ModuleInterface {
|
|||
assert( $settings instanceof Settings );
|
||||
|
||||
try {
|
||||
$subscription_handler = $settings->get( 'subscription_handler' );
|
||||
$subscriptions_mode = $settings->get( 'subscriptions_mode' );
|
||||
} catch ( NotFoundException $exception ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
$subscription_handler !== true
|
||||
$subscriptions_mode !== 'subscriptions_api'
|
||||
|| empty( $_POST['_wcsnonce'] )
|
||||
|| ! wp_verify_nonce( wc_clean( wp_unslash( $_POST['_wcsnonce'] ) ), 'wcs_subscription_meta' ) ) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue