diff --git a/modules.php b/modules.php index d9b363081..7e93c89ea 100644 --- a/modules.php +++ b/modules.php @@ -46,7 +46,7 @@ return function ( string $root_dir ): iterable { if ( apply_filters( //phpcs:disable WordPress.NamingConventions.ValidHookName.UseUnderscores - 'woocommerce.deprecated-flags.woocommerce_paypal_payments.saved_payment_checker_enabled', + 'woocommerce.deprecated_flags.woocommerce_paypal_payments.saved_payment_checker_enabled', getenv( 'PCP_SAVED_PAYMENT_CHECKER_ENABLED' ) === '1' ) ) { $modules[] = ( require "$modules_dir/ppcp-saved-payment-checker/module.php" )(); diff --git a/modules/ppcp-api-client/src/Endpoint/OrderEndpoint.php b/modules/ppcp-api-client/src/Endpoint/OrderEndpoint.php index ad2bfea59..abba2c182 100644 --- a/modules/ppcp-api-client/src/Endpoint/OrderEndpoint.php +++ b/modules/ppcp-api-client/src/Endpoint/OrderEndpoint.php @@ -194,7 +194,7 @@ class OrderEndpoint { ): Order { $bearer = $this->bearer->bearer(); $data = array( - 'intent' => apply_filters( 'woocommerce_paypal_payments_saved_payment_subscription_intent', $this->intent ), + 'intent' => apply_filters( 'woocommerce_paypal_payments_order_intent', $this->intent ), 'purchase_units' => array_map( static function ( PurchaseUnit $item ) use ( $shipping_preference ): array { $data = $item->to_array(); diff --git a/modules/ppcp-button/src/Assets/SmartButton.php b/modules/ppcp-button/src/Assets/SmartButton.php index a0e0b4e32..426bb9251 100644 --- a/modules/ppcp-button/src/Assets/SmartButton.php +++ b/modules/ppcp-button/src/Assets/SmartButton.php @@ -1554,7 +1554,7 @@ class SmartButton implements SmartButtonInterface { $intent = $this->settings->has( 'intent' ) ? $this->settings->get( 'intent' ) : 'capture'; - return strtolower( apply_filters( 'woocommerce_paypal_payments_saved_payment_subscription_intent', $intent ) ); + return strtolower( apply_filters( 'woocommerce_paypal_payments_order_intent', $intent ) ); } /** diff --git a/modules/ppcp-saved-payment-checker/composer.json b/modules/ppcp-saved-payment-checker/composer.json index da4404469..96c8931c3 100644 --- a/modules/ppcp-saved-payment-checker/composer.json +++ b/modules/ppcp-saved-payment-checker/composer.json @@ -1,5 +1,5 @@ { - "name": "woocommerce/ppcp-saved-payment-checked", + "name": "woocommerce/ppcp-saved-payment-checker", "type": "dhii-mod", "description": "Saved payments checker module", "license": "GPL-2.0", diff --git a/modules/ppcp-saved-payment-checker/src/SavedPaymentCheckerModule.php b/modules/ppcp-saved-payment-checker/src/SavedPaymentCheckerModule.php index 0055303f1..f04143ebc 100644 --- a/modules/ppcp-saved-payment-checker/src/SavedPaymentCheckerModule.php +++ b/modules/ppcp-saved-payment-checker/src/SavedPaymentCheckerModule.php @@ -41,7 +41,7 @@ class SavedPaymentCheckerModule implements ModuleInterface { * Set authorize intent for vaulted subscriptions, so we can void if payment not saved. */ add_filter( - 'woocommerce_paypal_payments_saved_payment_subscription_intent', + 'woocommerce_paypal_payments_order_intent', function( string $intent ) use ( $c ) { $subscription_helper = $c->get( 'subscription.helper' ); assert( $subscription_helper instanceof SubscriptionHelper );