mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Move vaulted subscriptions intent logic to module
This commit is contained in:
parent
80cc94939d
commit
7d17e4a892
3 changed files with 24 additions and 7 deletions
|
@ -194,7 +194,7 @@ class OrderEndpoint {
|
|||
): Order {
|
||||
$bearer = $this->bearer->bearer();
|
||||
$data = array(
|
||||
'intent' => ( $this->subscription_helper->cart_contains_subscription() || $this->subscription_helper->current_product_is_subscription() ) ? 'AUTHORIZE' : $this->intent,
|
||||
'intent' => apply_filters( 'woocommerce_paypal_payments_saved_payment_subscription_intent', $this->intent ),
|
||||
'purchase_units' => array_map(
|
||||
static function ( PurchaseUnit $item ) use ( $shipping_preference ): array {
|
||||
$data = $item->to_array();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue