From 19c8e7528d2e3c3d26c993ee1d8a112a48b0ac2b Mon Sep 17 00:00:00 2001 From: dpanta Date: Thu, 16 Dec 2021 17:27:34 +0200 Subject: [PATCH 01/31] fix: fatal error on Amazon API errors --- ...c-amazon-payments-advanced-order-admin.php | 3 +- ...ss-wc-gateway-amazon-payments-advanced.php | 4 ++ ...payments-advanced-subscriptions-legacy.php | 41 +++++++++++++++---- 3 files changed, 38 insertions(+), 10 deletions(-) diff --git a/includes/admin/class-wc-amazon-payments-advanced-order-admin.php b/includes/admin/class-wc-amazon-payments-advanced-order-admin.php index bf05adfe..a0fcd57e 100644 --- a/includes/admin/class-wc-amazon-payments-advanced-order-admin.php +++ b/includes/admin/class-wc-amazon-payments-advanced-order-admin.php @@ -180,6 +180,7 @@ public function auth_box_render( $order, $version ) { $charge_permission_status_label = $this->status_details_label( $charge_permission_cached_status ); + $charge_permission_status_label = $charge_permission_status_label ? $charge_permission_status_label : __( 'Invalid', 'woocommerce-gateway-amazon-payments-advanced' ); /* translators: 1) Charge Permission ID 2) Status. */ echo wpautop( sprintf( __( 'Charge Permission %1$s is %2$s.', 'woocommerce-gateway-amazon-payments-advanced' ), esc_html( $charge_permission_id ), esc_html( $charge_permission_status_label ) ) ); @@ -214,7 +215,7 @@ public function auth_box_render( $order, $version ) { $charge_cached_status = wc_apa()->get_gateway()->get_cached_charge_status( $order ); $charge_status_label = $this->status_details_label( $charge_cached_status ); - + $charge_status_label = $charge_status_label ? $charge_status_label : __( 'Invalid', 'woocommerce-gateway-amazon-payments-advanced' ); /* translators: 1) Charge ID 2) Status. */ echo wpautop( sprintf( __( 'Charge %1$s is %2$s.', 'woocommerce-gateway-amazon-payments-advanced' ), esc_html( $charge_id ), esc_html( $charge_status_label ) ) ); diff --git a/includes/class-wc-gateway-amazon-payments-advanced.php b/includes/class-wc-gateway-amazon-payments-advanced.php index be0db512..ceb6350a 100644 --- a/includes/class-wc-gateway-amazon-payments-advanced.php +++ b/includes/class-wc-gateway-amazon-payments-advanced.php @@ -1882,6 +1882,10 @@ public function refresh_cached_charge_permission_status( $order, $charge_permiss $charge_permission_id = $charge_permission->chargePermissionId; // phpcs:ignore WordPress.NamingConventions } + if ( is_wp_error( $charge_permission ) ) { + return $charge_permission; + } + $charge_permission_status = $this->format_status_details( $charge_permission->statusDetails ); // phpcs:ignore WordPress.NamingConventions $charge_permission_status->type = $charge_permission->chargePermissionType; // phpcs:ignore WordPress.NamingConventions diff --git a/includes/legacy/class-wc-gateway-amazon-payments-advanced-subscriptions-legacy.php b/includes/legacy/class-wc-gateway-amazon-payments-advanced-subscriptions-legacy.php index dd5cb2d5..fdbbd247 100644 --- a/includes/legacy/class-wc-gateway-amazon-payments-advanced-subscriptions-legacy.php +++ b/includes/legacy/class-wc-gateway-amazon-payments-advanced-subscriptions-legacy.php @@ -97,6 +97,10 @@ public function process_payment( $process, $order_id ) { // Get the Billing Agreement Details, with FULL address (now that we've confirmed). $result = $this->get_billing_agreement_details( $order_id, $amazon_billing_agreement_id ); + if ( is_wp_error( $result ) ) { + $error_msg = $result->get_error_message( 'billing_agreemment_details_failed' ) ? $result->get_error_message( 'billing_agreemment_details_failed' ) : $result->get_error_message(); + throw new Exception( $error_msg ); + } // Store the subscription destination. $this->store_subscription_destination( $order_id, $result ); @@ -202,9 +206,13 @@ private function set_billing_agreement_details( $order, $amazon_billing_agreemen $response = WC_Amazon_Payments_Advanced_API_Legacy::request( $request_args ); $order_id = wc_apa_get_order_prop( $order, 'id' ); - $this->handle_generic_api_response_errors( __METHOD__, $response, $order_id, $amazon_billing_agreement_id ); + try { + $this->handle_generic_api_response_errors( __METHOD__, $response, $order_id, $amazon_billing_agreement_id ); - wc_apa()->log( "Info: SetBillingAgreementDetails for order {$order_id} with billing agreement: {$amazon_billing_agreement_id}." ); + wc_apa()->log( "Info: SetBillingAgreementDetails for order {$order_id} with billing agreement: {$amazon_billing_agreement_id}." ); + } catch ( Exception $e ) { + wc_apa()->log( "Error: Exception encountered in 'SetBillingAgreementDetails': {$e->getMessage()}" ); + } return $response; @@ -237,10 +245,13 @@ private function confirm_billing_agreement( $order_id, $amazon_billing_agreement } $response = WC_Amazon_Payments_Advanced_API_Legacy::request( $confirm_args ); + try { + $this->handle_generic_api_response_errors( __METHOD__, $response, $order_id, $amazon_billing_agreement_id ); - $this->handle_generic_api_response_errors( __METHOD__, $response, $order_id, $amazon_billing_agreement_id ); - - wc_apa()->log( "Info: ConfirmBillingAgreement for Billing Agreement ID: {$amazon_billing_agreement_id}." ); + wc_apa()->log( "Info: ConfirmBillingAgreement for Billing Agreement ID: {$amazon_billing_agreement_id}." ); + } catch ( Exception $e ) { + wc_apa()->log( "Error: Exception encountered in 'ConfirmBillingAgreement': {$e->getMessage()}" ); + } return $response; @@ -366,9 +377,21 @@ private function get_billing_agreement_details( $order_id, $amazon_billing_agree ) ); - $this->handle_generic_api_response_errors( __METHOD__, $response, $order_id, $amazon_billing_agreement_id ); + try { + $this->handle_generic_api_response_errors( __METHOD__, $response, $order_id, $amazon_billing_agreement_id ); - wc_apa()->log( "Info: GetBillingAgreementDetails for Billing Agreement ID: {$amazon_billing_agreement_id}." ); + wc_apa()->log( "Info: GetBillingAgreementDetails for Billing Agreement ID: {$amazon_billing_agreement_id}." ); + } catch ( Exception $e ) { + wc_apa()->log( "Error: Exception encountered in 'GetBillingAgreementDetails': {$e->getMessage()}" ); + + $return = new WP_Error(); + $return->add( + 'billing_agreemment_details_failed', + is_object( $response ) && ! empty( $response->Error ) && is_object( $response->Error->Message ) && ! empty( $response->Error->Message ) ? + $response->Error->Message : + sprintf( __( 'Amazon API responded with an unexpected error when requesting for "GetBillingAgreementDetails" of billing agreement with ID %s', 'woocommerce-gateway-amazon-payments-advanced' ), $amazon_billing_agreement_id ) + ); + } return $response; } @@ -607,7 +630,7 @@ public function scheduled_subscription_payment( $amount_to_charge, $order ) { /* translators: 1) Reason. */ $order->add_order_note( sprintf( __( 'Amazon Pay subscription renewal failed - %s', 'woocommerce-gateway-amazon-payments-advanced' ), $e->getMessage() ) ); - wc_apa()->log( "Error: Exception encountered: {$e->getMessage()}" ); + wc_apa()->log( "Error: Exception encountered trying to renew subscription with Amazon Pay: {$e->getMessage()}" ); } } @@ -651,7 +674,7 @@ public function cancelled_subscription( $order ) { wc_apa()->log( "Info: CloseBillingAgreement for order {$order_id} with billing agreement: {$amazon_billing_agreement_id}." ); } catch ( Exception $e ) { - wc_apa()->log( "Error: Exception encountered: {$e->getMessage()}" ); + wc_apa()->log( "Error: Exception encountered in 'CloseBillingAgreement': {$e->getMessage()}" ); /* translators: placeholder is error message from Amazon Pay API */ $order->add_order_note( sprintf( __( "Exception encountered in 'CloseBillingAgreement': %s", 'woocommerce-gateway-amazon-payments-advanced' ), $e->getMessage() ) ); From 5273033ea0dda497766e843ad37e38c4ae9417f0 Mon Sep 17 00:00:00 2001 From: dpanta Date: Thu, 16 Dec 2021 19:03:14 +0200 Subject: [PATCH 02/31] fix: return WP_Error after constructing it --- ...-gateway-amazon-payments-advanced-subscriptions-legacy.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/legacy/class-wc-gateway-amazon-payments-advanced-subscriptions-legacy.php b/includes/legacy/class-wc-gateway-amazon-payments-advanced-subscriptions-legacy.php index fdbbd247..ab3bf4ff 100644 --- a/includes/legacy/class-wc-gateway-amazon-payments-advanced-subscriptions-legacy.php +++ b/includes/legacy/class-wc-gateway-amazon-payments-advanced-subscriptions-legacy.php @@ -384,13 +384,13 @@ private function get_billing_agreement_details( $order_id, $amazon_billing_agree } catch ( Exception $e ) { wc_apa()->log( "Error: Exception encountered in 'GetBillingAgreementDetails': {$e->getMessage()}" ); - $return = new WP_Error(); - $return->add( + $return = new WP_Error( 'billing_agreemment_details_failed', is_object( $response ) && ! empty( $response->Error ) && is_object( $response->Error->Message ) && ! empty( $response->Error->Message ) ? $response->Error->Message : sprintf( __( 'Amazon API responded with an unexpected error when requesting for "GetBillingAgreementDetails" of billing agreement with ID %s', 'woocommerce-gateway-amazon-payments-advanced' ), $amazon_billing_agreement_id ) ); + return $return; } return $response; } From 2342a46550627dd714933215d9e9d1f1ab469f88 Mon Sep 17 00:00:00 2001 From: dpanta Date: Thu, 16 Dec 2021 19:10:23 +0200 Subject: [PATCH 03/31] feat: return the variable directly --- ...c-gateway-amazon-payments-advanced-subscriptions-legacy.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/legacy/class-wc-gateway-amazon-payments-advanced-subscriptions-legacy.php b/includes/legacy/class-wc-gateway-amazon-payments-advanced-subscriptions-legacy.php index ab3bf4ff..19ac513a 100644 --- a/includes/legacy/class-wc-gateway-amazon-payments-advanced-subscriptions-legacy.php +++ b/includes/legacy/class-wc-gateway-amazon-payments-advanced-subscriptions-legacy.php @@ -384,13 +384,12 @@ private function get_billing_agreement_details( $order_id, $amazon_billing_agree } catch ( Exception $e ) { wc_apa()->log( "Error: Exception encountered in 'GetBillingAgreementDetails': {$e->getMessage()}" ); - $return = new WP_Error( + return new WP_Error( 'billing_agreemment_details_failed', is_object( $response ) && ! empty( $response->Error ) && is_object( $response->Error->Message ) && ! empty( $response->Error->Message ) ? $response->Error->Message : sprintf( __( 'Amazon API responded with an unexpected error when requesting for "GetBillingAgreementDetails" of billing agreement with ID %s', 'woocommerce-gateway-amazon-payments-advanced' ), $amazon_billing_agreement_id ) ); - return $return; } return $response; } From 408d96346687002d331802dbf5dc2e9df410d4e3 Mon Sep 17 00:00:00 2001 From: dpanta Date: Fri, 17 Dec 2021 20:41:09 +0200 Subject: [PATCH 04/31] fix: check for wp_error before requesting status_details_label --- .../admin/class-wc-amazon-payments-advanced-order-admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin/class-wc-amazon-payments-advanced-order-admin.php b/includes/admin/class-wc-amazon-payments-advanced-order-admin.php index a0fcd57e..774ea27e 100644 --- a/includes/admin/class-wc-amazon-payments-advanced-order-admin.php +++ b/includes/admin/class-wc-amazon-payments-advanced-order-admin.php @@ -178,7 +178,7 @@ public function auth_box_render( $order, $version ) { $charge_permission_cached_status = wc_apa()->get_gateway()->get_cached_charge_permission_status( $order ); - $charge_permission_status_label = $this->status_details_label( $charge_permission_cached_status ); + $charge_permission_status_label = ! is_wp_error( $charge_permission_cached_status ) ? $this->status_details_label( $charge_permission_cached_status ) : false; $charge_permission_status_label = $charge_permission_status_label ? $charge_permission_status_label : __( 'Invalid', 'woocommerce-gateway-amazon-payments-advanced' ); /* translators: 1) Charge Permission ID 2) Status. */ From 7f3c1f5205a2bdb3df37cbb531362300d620e7b8 Mon Sep 17 00:00:00 2001 From: dpanta Date: Fri, 17 Dec 2021 20:56:12 +0200 Subject: [PATCH 05/31] fix: check again for wp_error before accessing variable's prop --- .../admin/class-wc-amazon-payments-advanced-order-admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin/class-wc-amazon-payments-advanced-order-admin.php b/includes/admin/class-wc-amazon-payments-advanced-order-admin.php index 774ea27e..551a017a 100644 --- a/includes/admin/class-wc-amazon-payments-advanced-order-admin.php +++ b/includes/admin/class-wc-amazon-payments-advanced-order-admin.php @@ -184,7 +184,7 @@ public function auth_box_render( $order, $version ) { /* translators: 1) Charge Permission ID 2) Status. */ echo wpautop( sprintf( __( 'Charge Permission %1$s is %2$s.', 'woocommerce-gateway-amazon-payments-advanced' ), esc_html( $charge_permission_id ), esc_html( $charge_permission_status_label ) ) ); - $charge_permission_status = $charge_permission_cached_status->status; + $charge_permission_status = ! is_wp_error( $charge_permission_cached_status ) ? $charge_permission_cached_status->status : ''; switch ( $charge_permission_status ) { case 'Chargeable': From 1659b351e15218d825bea7b7e4bd86986389bac8 Mon Sep 17 00:00:00 2001 From: Alejandro Iglesias Date: Fri, 16 Feb 2024 11:02:28 +0100 Subject: [PATCH 06/31] improve detection japanese region --- ...-amazon-payments-advanced-api-abstract.php | 2 + ...eway-amazon-payments-advanced-abstract.php | 94 +++++++++---------- ...ss-wc-gateway-amazon-payments-advanced.php | 30 +++++- 3 files changed, 77 insertions(+), 49 deletions(-) diff --git a/includes/class-wc-amazon-payments-advanced-api-abstract.php b/includes/class-wc-amazon-payments-advanced-api-abstract.php index ef708f13..121981f9 100644 --- a/includes/class-wc-amazon-payments-advanced-api-abstract.php +++ b/includes/class-wc-amazon-payments-advanced-api-abstract.php @@ -497,6 +497,8 @@ public static function format_address( $address ) { $valid_state_values = array_map( 'wc_strtoupper', array_flip( array_map( 'wc_strtoupper', $valid_states ) ) ); $uc_state = wc_strtoupper( $formatted['state'] ); + $uc_state = WC_Gateway_Amazon_Payments_Advanced::maybe_get_jp_region_code( $uc_state ); + if ( isset( $valid_state_values[ $uc_state ] ) ) { // With this part we consider state value to be valid as well, convert it to the state key for the valid_states check below. $uc_state = $valid_state_values[ $uc_state ]; diff --git a/includes/class-wc-gateway-amazon-payments-advanced-abstract.php b/includes/class-wc-gateway-amazon-payments-advanced-abstract.php index a854629c..e2bc38e6 100644 --- a/includes/class-wc-gateway-amazon-payments-advanced-abstract.php +++ b/includes/class-wc-gateway-amazon-payments-advanced-abstract.php @@ -18,53 +18,53 @@ abstract class WC_Gateway_Amazon_Payments_Advanced_Abstract extends WC_Payment_G * Specifically requested by Amazon's JP Team. */ const JP_REGION_CODE_MAP = array( - 'JP01' => '北海道', - 'JP02' => '青森県', - 'JP03' => '岩手県', - 'JP04' => '宮城県', - 'JP05' => '秋田県', - 'JP06' => '山形県', - 'JP07' => '福島県', - 'JP08' => '茨城県', - 'JP09' => '栃木県', - 'JP10' => '群馬県', - 'JP11' => '埼玉県', - 'JP12' => '千葉県', - 'JP13' => '東京都', - 'JP14' => '神奈川県', - 'JP15' => '新潟県', - 'JP16' => '富山県', - 'JP17' => '石川県', - 'JP18' => '福井県', - 'JP19' => '山梨県', - 'JP20' => '長野県', - 'JP21' => '岐阜県', - 'JP22' => '静岡県', - 'JP23' => '愛知県', - 'JP24' => '三重県', - 'JP25' => '滋賀県', - 'JP26' => '京都府', - 'JP27' => '大阪府', - 'JP28' => '兵庫県', - 'JP29' => '奈良県', - 'JP30' => '和歌山県', - 'JP31' => '鳥取県', - 'JP32' => '島根県', - 'JP33' => '岡山県', - 'JP34' => '広島県', - 'JP35' => '山口県', - 'JP36' => '徳島県', - 'JP37' => '香川県', - 'JP38' => '愛媛県', - 'JP39' => '高知県', - 'JP40' => '福岡県', - 'JP41' => '佐賀県', - 'JP42' => '長崎県', - 'JP43' => '熊本県', - 'JP44' => '大分県', - 'JP45' => '宮崎県', - 'JP46' => '鹿児島県', - 'JP47' => '沖縄県', + 'JP01' => array( 'Hokkaido', 'Hokkaido', '北海道' ), + 'JP02' => array( 'Aomori', 'Aomori', '青森県' ), + 'JP03' => array( 'Iwate', 'Iwate', '岩手県' ), + 'JP04' => array( 'Miyagi', 'Miyagi', '宮城県' ), + 'JP05' => array( 'Akita', 'Akita', '秋田県' ), + 'JP06' => array( 'Yamagata', 'Yamagata', '山形県' ), + 'JP07' => array( 'Fukushima', 'Fukushima', '福島県' ), + 'JP08' => array( 'Ibaraki', 'Ibaraki', '茨城県' ), + 'JP09' => array( 'Tochigi', 'Tochigi', '栃木県' ), + 'JP10' => array( 'Gunma', 'Gunma', '群馬県' ), + 'JP11' => array( 'Saitama', 'Saitama', '埼玉県' ), + 'JP12' => array( 'Chiba', 'Chiba', '千葉県' ), + 'JP13' => array( 'Tokyo', 'Tokyo', '東京都' ), + 'JP14' => array( 'Kanagawa', 'Kanagawa', '神奈川県' ), + 'JP15' => array( 'Niigata', 'Niigata', '新潟県' ), + 'JP16' => array( 'Toyama', 'Toyama', '富山県' ), + 'JP17' => array( 'Ishikawa', 'Ishikawa', '石川県' ), + 'JP18' => array( 'Fukui', 'Fukui', '福井県' ), + 'JP19' => array( 'Yamanashi', 'Yamanashi', '山梨県' ), + 'JP20' => array( 'Nagano', 'Nagano', '長野県' ), + 'JP21' => array( 'Gifu', 'Gifu', '岐阜県' ), + 'JP22' => array( 'Shizuoka', 'Shizuoka', '静岡県' ), + 'JP23' => array( 'Aichi', 'Aichi', '愛知県' ), + 'JP24' => array( 'Mie', 'Mie', '三重県' ), + 'JP25' => array( 'Shiga', 'Shiga', '滋賀県' ), + 'JP26' => array( 'Kyoto', 'Kyoto', '京都府' ), + 'JP27' => array( 'Osaka', 'Osaka', '大阪府' ), + 'JP28' => array( 'Hyogo', 'Hyogo', '兵庫県' ), + 'JP29' => array( 'Nara', 'Nara', '奈良県' ), + 'JP30' => array( 'Wakayama', 'Wakayama', '和歌山県' ), + 'JP31' => array( 'Tottori', 'Tottori', '鳥取県' ), + 'JP32' => array( 'Shimane', 'Shimane', '島根県' ), + 'JP33' => array( 'Okayama', 'Okayama', '岡山県' ), + 'JP34' => array( 'Hiroshima', 'Hiroshima', '広島県' ), + 'JP35' => array( 'Yamaguchi', 'Yamaguchi', '山口県' ), + 'JP36' => array( 'Tokushima', 'Tokushima', '徳島県' ), + 'JP37' => array( 'Kagawa', 'Kagawa', '香川県' ), + 'JP38' => array( 'Ehime', 'Ehime', '愛媛県' ), + 'JP39' => array( 'Kochi', 'Kochi', '高知県' ), + 'JP40' => array( 'Fukuoka', 'Fukuoka', '福岡県' ), + 'JP41' => array( 'Saga', 'Saga', '佐賀県' ), + 'JP42' => array( 'Nagasaki', 'Nagasaki', '長崎県' ), + 'JP43' => array( 'Kumamoto', 'Kumamoto', '熊本県' ), + 'JP44' => array( 'Oita', 'Oita', '大分県' ), + 'JP45' => array( 'Miyazaki', 'Miyazaki', '宮崎県' ), + 'JP46' => array( 'Kagoshima', 'Kagoshima', '鹿児島県' ), + 'JP47' => array( 'Okinawa', 'Okinawa', '沖縄県' ), ); /** diff --git a/includes/class-wc-gateway-amazon-payments-advanced.php b/includes/class-wc-gateway-amazon-payments-advanced.php index bf1d69e7..792823e7 100644 --- a/includes/class-wc-gateway-amazon-payments-advanced.php +++ b/includes/class-wc-gateway-amazon-payments-advanced.php @@ -2991,8 +2991,8 @@ public function update_address_details_for_classic( $payload, $checkout_session_ $shipping_state = $order->get_shipping_state(); $shipping_country = $order->get_shipping_country( 'edit' ); - if ( 'JP' === strtoupper( $shipping_country ) && 'JP' === strtoupper( WC_Amazon_Payments_Advanced_API::get_region() ) && isset( self::JP_REGION_CODE_MAP[ $shipping_state ] ) ) { - $shipping_state = self::JP_REGION_CODE_MAP[ $shipping_state ]; + if ( 'JP' === strtoupper( $shipping_country ) && 'JP' === strtoupper( WC_Amazon_Payments_Advanced_API::get_region() ) ) { + $shipping_state = $this->maybe_get_jp_region_code( $shipping_state ); } $payload['addressDetails'] = array( @@ -3020,6 +3020,32 @@ public function update_address_details_for_classic( $payload, $checkout_session_ return $payload; } + /** + * Maybe get JP region code. + * + * @param string $shipping_state The shipping state. + * + * @return string + */ + public static function maybe_get_jp_region_code( $shipping_state ) { + + static $formatted_states; + + if ( isset( $formatted_states[ $shipping_state ] ) ) { + return $formatted_states[ $shipping_state ]; + } + + $formatted_states[ $shipping_state ] = $shipping_state; + + foreach ( self::JP_REGION_CODE_MAP as $region_code => $region ) { + if ( is_array( $region ) && in_array( $shipping_state, $region, true ) ) { + $formatted_states[ $shipping_state ] = $region_code; + } + } + + return $formatted_states[ $shipping_state ]; + } + /** * Get the estimated order amount from the cart totals. * From 2fe704204436e68a85f5b84d44294fe547feb2a1 Mon Sep 17 00:00:00 2001 From: Alejandro Iglesias Date: Tue, 5 Mar 2024 17:42:14 +0100 Subject: [PATCH 07/31] use "-" instead of "." as fallback --- includes/class-wc-amazon-payments-advanced-api-abstract.php | 2 +- src/js/non-block/legacy/amazon-app-widgets.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/class-wc-amazon-payments-advanced-api-abstract.php b/includes/class-wc-amazon-payments-advanced-api-abstract.php index 121981f9..8510529e 100644 --- a/includes/class-wc-amazon-payments-advanced-api-abstract.php +++ b/includes/class-wc-amazon-payments-advanced-api-abstract.php @@ -391,7 +391,7 @@ public static function format_name( $name ) { ); } // Use fallback value for the last name to avoid field required errors. - $last_name_fallback = '.'; + $last_name_fallback = '-'; $names = explode( ' ', $name ); return array( 'first_name' => array_shift( $names ), diff --git a/src/js/non-block/legacy/amazon-app-widgets.js b/src/js/non-block/legacy/amazon-app-widgets.js index aa219488..2f8e47c4 100644 --- a/src/js/non-block/legacy/amazon-app-widgets.js +++ b/src/js/non-block/legacy/amazon-app-widgets.js @@ -99,7 +99,7 @@ jQuery( function( $ ) { function formatAmazonName( name ) { // Use fallback value for the last name to avoid field required errors. - var lastNameFallback = '.'; + var lastNameFallback = '-'; var names = name.split( ' ' ); return { first_name: names.shift(), From 9fde4a7caeaf1e43f8486f990ab922a49fef380c Mon Sep 17 00:00:00 2001 From: Alejandro Iglesias Date: Sat, 23 Mar 2024 16:53:09 +0100 Subject: [PATCH 08/31] fix 2nd column --- ...eway-amazon-payments-advanced-abstract.php | 94 +++++++++---------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/includes/class-wc-gateway-amazon-payments-advanced-abstract.php b/includes/class-wc-gateway-amazon-payments-advanced-abstract.php index e2bc38e6..3b100835 100644 --- a/includes/class-wc-gateway-amazon-payments-advanced-abstract.php +++ b/includes/class-wc-gateway-amazon-payments-advanced-abstract.php @@ -18,53 +18,53 @@ abstract class WC_Gateway_Amazon_Payments_Advanced_Abstract extends WC_Payment_G * Specifically requested by Amazon's JP Team. */ const JP_REGION_CODE_MAP = array( - 'JP01' => array( 'Hokkaido', 'Hokkaido', '北海道' ), - 'JP02' => array( 'Aomori', 'Aomori', '青森県' ), - 'JP03' => array( 'Iwate', 'Iwate', '岩手県' ), - 'JP04' => array( 'Miyagi', 'Miyagi', '宮城県' ), - 'JP05' => array( 'Akita', 'Akita', '秋田県' ), - 'JP06' => array( 'Yamagata', 'Yamagata', '山形県' ), - 'JP07' => array( 'Fukushima', 'Fukushima', '福島県' ), - 'JP08' => array( 'Ibaraki', 'Ibaraki', '茨城県' ), - 'JP09' => array( 'Tochigi', 'Tochigi', '栃木県' ), - 'JP10' => array( 'Gunma', 'Gunma', '群馬県' ), - 'JP11' => array( 'Saitama', 'Saitama', '埼玉県' ), - 'JP12' => array( 'Chiba', 'Chiba', '千葉県' ), - 'JP13' => array( 'Tokyo', 'Tokyo', '東京都' ), - 'JP14' => array( 'Kanagawa', 'Kanagawa', '神奈川県' ), - 'JP15' => array( 'Niigata', 'Niigata', '新潟県' ), - 'JP16' => array( 'Toyama', 'Toyama', '富山県' ), - 'JP17' => array( 'Ishikawa', 'Ishikawa', '石川県' ), - 'JP18' => array( 'Fukui', 'Fukui', '福井県' ), - 'JP19' => array( 'Yamanashi', 'Yamanashi', '山梨県' ), - 'JP20' => array( 'Nagano', 'Nagano', '長野県' ), - 'JP21' => array( 'Gifu', 'Gifu', '岐阜県' ), - 'JP22' => array( 'Shizuoka', 'Shizuoka', '静岡県' ), - 'JP23' => array( 'Aichi', 'Aichi', '愛知県' ), - 'JP24' => array( 'Mie', 'Mie', '三重県' ), - 'JP25' => array( 'Shiga', 'Shiga', '滋賀県' ), - 'JP26' => array( 'Kyoto', 'Kyoto', '京都府' ), - 'JP27' => array( 'Osaka', 'Osaka', '大阪府' ), - 'JP28' => array( 'Hyogo', 'Hyogo', '兵庫県' ), - 'JP29' => array( 'Nara', 'Nara', '奈良県' ), - 'JP30' => array( 'Wakayama', 'Wakayama', '和歌山県' ), - 'JP31' => array( 'Tottori', 'Tottori', '鳥取県' ), - 'JP32' => array( 'Shimane', 'Shimane', '島根県' ), - 'JP33' => array( 'Okayama', 'Okayama', '岡山県' ), - 'JP34' => array( 'Hiroshima', 'Hiroshima', '広島県' ), - 'JP35' => array( 'Yamaguchi', 'Yamaguchi', '山口県' ), - 'JP36' => array( 'Tokushima', 'Tokushima', '徳島県' ), - 'JP37' => array( 'Kagawa', 'Kagawa', '香川県' ), - 'JP38' => array( 'Ehime', 'Ehime', '愛媛県' ), - 'JP39' => array( 'Kochi', 'Kochi', '高知県' ), - 'JP40' => array( 'Fukuoka', 'Fukuoka', '福岡県' ), - 'JP41' => array( 'Saga', 'Saga', '佐賀県' ), - 'JP42' => array( 'Nagasaki', 'Nagasaki', '長崎県' ), - 'JP43' => array( 'Kumamoto', 'Kumamoto', '熊本県' ), - 'JP44' => array( 'Oita', 'Oita', '大分県' ), - 'JP45' => array( 'Miyazaki', 'Miyazaki', '宮崎県' ), - 'JP46' => array( 'Kagoshima', 'Kagoshima', '鹿児島県' ), - 'JP47' => array( 'Okinawa', 'Okinawa', '沖縄県' ), + 'JP01' => array( 'Hokkaido', 'Hokkaidō', '北海道' ), + 'JP02' => array( 'Aomori', 'Aomori-ken', '青森県' ), + 'JP03' => array( 'Iwate', 'Iwate-ken', '岩手県' ), + 'JP04' => array( 'Miyagi', 'Miyagi-ken', '宮城県' ), + 'JP05' => array( 'Akita', 'Akita-ken', '秋田県' ), + 'JP06' => array( 'Yamagata', 'Yamagata-ken', '山形県' ), + 'JP07' => array( 'Fukushima', 'Fukushima-ken', '福島県' ), + 'JP08' => array( 'Ibaraki', 'Ibaraki-ken', '茨城県' ), + 'JP09' => array( 'Tochigi', 'Tochigi-ken', '栃木県' ), + 'JP10' => array( 'Gunma', 'Gunma-ken', '群馬県' ), + 'JP11' => array( 'Saitama', 'Saitama-ken', '埼玉県' ), + 'JP12' => array( 'Chiba', 'Chiba-ken', '千葉県' ), + 'JP13' => array( 'Tokyo', 'Tōkyō-to', '東京都' ), + 'JP14' => array( 'Kanagawa', 'Kanagawa-ken', '神奈川県' ), + 'JP15' => array( 'Niigata', 'Niigata-ken', '新潟県' ), + 'JP16' => array( 'Toyama', 'Toyama-ken', '富山県' ), + 'JP17' => array( 'Ishikawa', 'Ishikawa-ken', '石川県' ), + 'JP18' => array( 'Fukui', 'Fukui-ken', '福井県' ), + 'JP19' => array( 'Yamanashi', 'Yamanashi-ken', '山梨県' ), + 'JP20' => array( 'Nagano', 'Nagano-ken', '長野県' ), + 'JP21' => array( 'Gifu', 'Gifu-ken', '岐阜県' ), + 'JP22' => array( 'Shizuoka', 'Shizuoka-ken', '静岡県' ), + 'JP23' => array( 'Aichi', 'Aichi-ken', '愛知県' ), + 'JP24' => array( 'Mie', 'Mie-ken', '三重県' ), + 'JP25' => array( 'Shiga', 'Shiga-ken', '滋賀県' ), + 'JP26' => array( 'Kyoto', 'Kyōto-fu', '京都府' ), + 'JP27' => array( 'Osaka', 'Ōsaka-fu', '大阪府' ), + 'JP28' => array( 'Hyogo', 'Hyōgo-ken', '兵庫県' ), + 'JP29' => array( 'Nara', 'Nara-ken', '奈良県' ), + 'JP30' => array( 'Wakayama', 'Wakayama-ken', '和歌山県' ), + 'JP31' => array( 'Tottori', 'Tottori-ken', '鳥取県' ), + 'JP32' => array( 'Shimane', 'Shimane-ken', '島根県' ), + 'JP33' => array( 'Okayama', 'Okayama-ken', '岡山県' ), + 'JP34' => array( 'Hiroshima', 'Hiroshima-ken', '広島県' ), + 'JP35' => array( 'Yamaguchi', 'Yamaguchi-ken', '山口県' ), + 'JP36' => array( 'Tokushima', 'Tokushima-ken', '徳島県' ), + 'JP37' => array( 'Kagawa', 'Kagawa-ken', '香川県' ), + 'JP38' => array( 'Ehime', 'Ehime-ken', '愛媛県' ), + 'JP39' => array( 'Kochi', 'Kōchi-ken', '高知県' ), + 'JP40' => array( 'Fukuoka', 'Fukuoka-ken', '福岡県' ), + 'JP41' => array( 'Saga', 'Saga-ken', '佐賀県' ), + 'JP42' => array( 'Nagasaki', 'Nagasaki-ken', '長崎県' ), + 'JP43' => array( 'Kumamoto', 'Kumamoto-ken', '熊本県' ), + 'JP44' => array( 'Oita', 'Ōita-ken', '大分県' ), + 'JP45' => array( 'Miyazaki', 'Miyazaki-ken', '宮崎県' ), + 'JP46' => array( 'Kagoshima', 'Kagoshima-ken', '鹿児島県' ), + 'JP47' => array( 'Okinawa', 'Okinawa-ken', '沖縄県' ), ); /** From 8370312478b2769ebf5326165dcabec4b8967831 Mon Sep 17 00:00:00 2001 From: Alejandro Iglesias Date: Wed, 19 Jun 2024 22:58:00 +0200 Subject: [PATCH 09/31] cache checkout session if possible --- includes/class-wc-amazon-payments-advanced-api.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/includes/class-wc-amazon-payments-advanced-api.php b/includes/class-wc-amazon-payments-advanced-api.php index 62f07956..7b02a3a5 100644 --- a/includes/class-wc-amazon-payments-advanced-api.php +++ b/includes/class-wc-amazon-payments-advanced-api.php @@ -472,16 +472,27 @@ public static function create_checkout_session_classic_params( $redirect_url = n * @return array */ public static function get_create_checkout_session_config( $redirect_url = null ) { + static $config = array(); + + $cached_config = empty( $redirect_url ) ? $redirect_url : 'default'; + + if ( ! empty( $config[ $cached_config ] ) && ! is_wp_error( $config[ $cached_config ] ) ) { + return $config[ $cached_config ]; + } + $settings = self::get_settings(); $client = self::get_client(); $payload = self::create_checkout_session_params( $redirect_url ); $signature = $client->generateButtonSignature( $payload ); - return array( + + $config[ $cached_config ] = array( 'publicKeyId' => $settings['public_key_id'], 'payloadJSON' => $payload, 'signature' => $signature, ); + + return $config[ $cached_config ]; } /** From 48fbc00ca77cdf50ac3f2f1aae5285b316da5560 Mon Sep 17 00:00:00 2001 From: Alejandro Iglesias Date: Wed, 19 Jun 2024 22:58:43 +0200 Subject: [PATCH 10/31] avoid infinite loop on checkout blocks --- ...ss-wc-gateway-amazon-payments-advanced.php | 11 +++-- ...payments-advanced-block-compat-express.php | 45 ++++++++++--------- 2 files changed, 30 insertions(+), 26 deletions(-) diff --git a/includes/class-wc-gateway-amazon-payments-advanced.php b/includes/class-wc-gateway-amazon-payments-advanced.php index 792823e7..10030ac5 100644 --- a/includes/class-wc-gateway-amazon-payments-advanced.php +++ b/includes/class-wc-gateway-amazon-payments-advanced.php @@ -1036,10 +1036,12 @@ public function display_payment_method_selected( $checkout_session = null ) { * session object. * * @param object $checkout_session The active checkout session. + * @param bool $force Whether to force the refresh of the checkout session. + * * @return boolean */ - public function has_payment_preferences( $checkout_session = null ) { - if ( null === $checkout_session ) { + public function has_payment_preferences( $checkout_session = null, $force = false ) { + if ( ! $force && null === $checkout_session ) { $checkout_session = $this->get_checkout_session(); } @@ -1054,10 +1056,11 @@ public function has_payment_preferences( $checkout_session = null ) { * Returns the selected payment method from Amazon. * * @param object $checkout_session The active checkout session. + * @param bool $force Whether to force the refresh of the checkout session. * @return string */ - public function get_selected_payment_label( $checkout_session = null ) { - if ( null === $checkout_session ) { + public function get_selected_payment_label( $checkout_session = null, $force = false ) { + if ( ! $force && null === $checkout_session ) { $checkout_session = $this->get_checkout_session(); } diff --git a/includes/compats/woo-blocks/class-wc-amazon-payments-advanced-block-compat-express.php b/includes/compats/woo-blocks/class-wc-amazon-payments-advanced-block-compat-express.php index dd561731..88e8a185 100644 --- a/includes/compats/woo-blocks/class-wc-amazon-payments-advanced-block-compat-express.php +++ b/includes/compats/woo-blocks/class-wc-amazon-payments-advanced-block-compat-express.php @@ -42,28 +42,29 @@ public function is_active() { * @return array */ public function get_payment_method_data() { - $wc_apa_gateway = wc_apa()->get_gateway(); - - $checkout_session = $wc_apa_gateway->get_checkout_session_id() ? $wc_apa_gateway->get_checkout_session() : null; - - return array( - 'title' => $this->settings['title'], - 'description' => $this->settings['description'], - 'hide_button_mode' => $this->settings['hide_button_mode'], - 'loggedIn' => ! is_admin() && $checkout_session && ! is_wp_error( $checkout_session ) && true === $wc_apa_gateway->is_checkout_session_still_valid( $checkout_session ), - 'supports' => $this->get_supported_features(), - 'logoutUrl' => $wc_apa_gateway->get_amazon_logout_url(), - 'logoutMessage' => apply_filters( 'woocommerce_amazon_pa_checkout_logout_message', __( 'You\'re logged in with your Amazon Account.', 'woocommerce-gateway-amazon-payments-advanced' ) ), - 'selectedPaymentMethod' => esc_html( $wc_apa_gateway->get_selected_payment_label( $checkout_session ) ), - 'hasPaymentPreferences' => $wc_apa_gateway->has_payment_preferences( $checkout_session ), - 'allOtherGateways' => $this->gateways_to_unset_on_fe(), - 'allowedCurrencies' => $this->get_allowed_currencies(), - 'amazonPayPreviewUrl' => esc_url( wc_apa()->plugin_url . '/build/images/amazon-pay-preview.png' ), - 'amazonAddress' => array( - 'amazonBilling' => $checkout_session && ! is_wp_error( $checkout_session ) && ! empty( $checkout_session->billingAddress ) ? WC_Amazon_Payments_Advanced_API::format_address( $checkout_session->billingAddress ) : null, // phpcs:ignore WordPress.NamingConventions - 'amazonShipping' => $checkout_session && ! is_wp_error( $checkout_session ) && ! empty( $checkout_session->shippingAddress ) ? WC_Amazon_Payments_Advanced_API::format_address( $checkout_session->shippingAddress ) : null, // phpcs:ignore WordPress.NamingConventions - ), - ); + $wc_apa_gateway = wc_apa()->get_gateway(); + + $checkout_session = $wc_apa_gateway->get_checkout_session_id() ? $wc_apa_gateway->get_checkout_session() : null; + + return array( + 'title' => $this->settings['title'], + 'description' => $this->settings['description'], + 'hide_button_mode' => $this->settings['hide_button_mode'], + 'loggedIn' => ! is_admin() && $checkout_session && ! is_wp_error( $checkout_session ) && true === $wc_apa_gateway->is_checkout_session_still_valid( $checkout_session ), + 'supports' => $this->get_supported_features(), + 'logoutUrl' => $wc_apa_gateway->get_amazon_logout_url(), + 'logoutMessage' => apply_filters( 'woocommerce_amazon_pa_checkout_logout_message', __( 'You\'re logged in with your Amazon Account.', 'woocommerce-gateway-amazon-payments-advanced' ) ), + 'selectedPaymentMethod' => esc_html( $wc_apa_gateway->get_selected_payment_label( $checkout_session, empty( $checkout_session ) ) ), + 'hasPaymentPreferences' => $wc_apa_gateway->has_payment_preferences( $checkout_session, empty( $checkout_session ) ), + 'hasPaymentPreferences' => false, + 'allOtherGateways' => $this->gateways_to_unset_on_fe(), + 'allowedCurrencies' => $this->get_allowed_currencies(), + 'amazonPayPreviewUrl' => esc_url( wc_apa()->plugin_url . '/build/images/amazon-pay-preview.png' ), + 'amazonAddress' => array( + 'amazonBilling' => $checkout_session && ! is_wp_error( $checkout_session ) && ! empty( $checkout_session->billingAddress ) ? WC_Amazon_Payments_Advanced_API::format_address( $checkout_session->billingAddress ) : null, // phpcs:ignore WordPress.NamingConventions + 'amazonShipping' => $checkout_session && ! is_wp_error( $checkout_session ) && ! empty( $checkout_session->shippingAddress ) ? WC_Amazon_Payments_Advanced_API::format_address( $checkout_session->shippingAddress ) : null, // phpcs:ignore WordPress.NamingConventions + ), + ); } From 53be5020cf46d10968f384f7bb602834730a9ddb Mon Sep 17 00:00:00 2001 From: Alejandro Iglesias Date: Wed, 19 Jun 2024 23:01:20 +0200 Subject: [PATCH 11/31] use dash as fallback to avoid sanitization of hyphen --- includes/class-wc-amazon-payments-advanced-api-abstract.php | 6 ++++-- src/js/non-block/legacy/amazon-app-widgets.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/class-wc-amazon-payments-advanced-api-abstract.php b/includes/class-wc-amazon-payments-advanced-api-abstract.php index 8510529e..49a1bcde 100644 --- a/includes/class-wc-amazon-payments-advanced-api-abstract.php +++ b/includes/class-wc-amazon-payments-advanced-api-abstract.php @@ -391,7 +391,7 @@ public static function format_name( $name ) { ); } // Use fallback value for the last name to avoid field required errors. - $last_name_fallback = '-'; + $last_name_fallback = '–'; $names = explode( ' ', $name ); return array( 'first_name' => array_shift( $names ), @@ -478,7 +478,9 @@ public static function format_address( $address ) { } - $formatted['phone'] = isset( $address->Phone ) ? (string) $address->Phone : null; + // Prevent invalid characters in phone number. + $formatted['phone'] = isset( $address->Phone ) ? (string) filter_var($address->Phone, FILTER_DEFAULT, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH) : null; + $formatted['city'] = isset( $address->City ) ? (string) $address->City : null; if ( ! empty( $address->CountryCode ) && in_array( $address->CountryCode, array( 'JP' ) ) ) { if ( empty( $formatted['city'] ) ) { diff --git a/src/js/non-block/legacy/amazon-app-widgets.js b/src/js/non-block/legacy/amazon-app-widgets.js index 2f8e47c4..7f16bf03 100644 --- a/src/js/non-block/legacy/amazon-app-widgets.js +++ b/src/js/non-block/legacy/amazon-app-widgets.js @@ -99,7 +99,7 @@ jQuery( function( $ ) { function formatAmazonName( name ) { // Use fallback value for the last name to avoid field required errors. - var lastNameFallback = '-'; + var lastNameFallback = '–'; var names = name.split( ' ' ); return { first_name: names.shift(), From e02de8021a5adb3c5b1fda98948f4c123eed3318 Mon Sep 17 00:00:00 2001 From: Alejandro Iglesias Date: Wed, 19 Jun 2024 23:56:17 +0200 Subject: [PATCH 12/31] override non required fields on checkout blocks --- ...lass-wc-amazon-payments-advanced-utils.php | 39 +++++++++++++++ ...eway-amazon-payments-advanced-abstract.php | 33 +++++-------- ...ss-wc-gateway-amazon-payments-advanced.php | 1 + src/js/_utils.js | 47 +++++++++++++++++++ .../express/_payment-methods.js | 8 +++- 5 files changed, 105 insertions(+), 23 deletions(-) diff --git a/includes/class-wc-amazon-payments-advanced-utils.php b/includes/class-wc-amazon-payments-advanced-utils.php index 43f27439..3e1a4363 100644 --- a/includes/class-wc-amazon-payments-advanced-utils.php +++ b/includes/class-wc-amazon-payments-advanced-utils.php @@ -26,4 +26,43 @@ public static function get_edit_order_screen_id() { ? wc_get_page_screen_id( 'shop-order' ) : 'shop_order'; } + + + /** + * Get non required fields. + * + * @return array + */ + public static function get_non_required_fields() { + + $non_required_fields = array( + 'billing_last_name', + 'billing_state', + 'billing_phone', + 'shipping_last_name', + 'shipping_state', + ); + + return apply_filters( 'woocommerce_amazon_pa_non_required_fields', $non_required_fields ); + } + + + /** + * Get non required fields per country. + * + * @return array + */ + public static function get_non_required_fields_per_country() { + + $non_required_fields = array( + 'JP' => array( + 'billing_city', + 'shipping_city', + 'billing-city', + 'shipping-city', + ), + ); + + return apply_filters( 'woocommerce_amazon_pa_non_required_fields_per_country', $non_required_fields ); + } } diff --git a/includes/class-wc-gateway-amazon-payments-advanced-abstract.php b/includes/class-wc-gateway-amazon-payments-advanced-abstract.php index 3b100835..1d3fea81 100644 --- a/includes/class-wc-gateway-amazon-payments-advanced-abstract.php +++ b/includes/class-wc-gateway-amazon-payments-advanced-abstract.php @@ -1033,30 +1033,21 @@ public function remove_gateways( $gateways ) { return $gateways; } - /** - * Override billing fields when checking out with Amazon. - * - * @param array $fields billing fields. - */ - public function override_billing_fields( $fields ) { - // Last name and State are not required on Amazon billing addrress forms. - $fields['billing_last_name']['required'] = false; - $fields['billing_state']['required'] = false; - // Phone field is missing on some sandbox accounts. - $fields['billing_phone']['required'] = false; - - return $fields; - } /** - * Override address fields when checking out with Amazon. + * Override checkout fields when checking out with Amazon. * * @param array $fields default address fields. */ - public function override_shipping_fields( $fields ) { - // Last name and State are not required on Amazon shipping address forms. - $fields['shipping_last_name']['required'] = false; - $fields['shipping_state']['required'] = false; + public function override_checkout_fields( $fields ) { + + $non_required_fields = WC_Amazon_Payments_Advanced_Utils::get_non_required_fields(); + + foreach ( $fields as $key => $field ) { + if ( ! in_array( $key, $non_required_fields, true ) ) { + $fields[ $key ]['required'] = false; + } + } return $fields; } @@ -1068,8 +1059,8 @@ public function checkout_init_common() { // Remove other gateways after being logged in. add_filter( 'woocommerce_available_payment_gateways', array( $this, 'remove_gateways' ) ); // Some fields are not enforced on Amazon's side. Marking them as optional avoids issues with checkout. - add_filter( 'woocommerce_billing_fields', array( $this, 'override_billing_fields' ) ); - add_filter( 'woocommerce_shipping_fields', array( $this, 'override_shipping_fields' ) ); + add_filter( 'woocommerce_billing_fields', array( $this, 'override_checkout_fields' ) ); + add_filter( 'woocommerce_shipping_fields', array( $this, 'override_checkout_fields' ) ); // Always ship to different address. add_action( 'woocommerce_ship_to_different_address_checked', '__return_true' ); } diff --git a/includes/class-wc-gateway-amazon-payments-advanced.php b/includes/class-wc-gateway-amazon-payments-advanced.php index 10030ac5..507c49fa 100644 --- a/includes/class-wc-gateway-amazon-payments-advanced.php +++ b/includes/class-wc-gateway-amazon-payments-advanced.php @@ -278,6 +278,7 @@ protected function get_js_params() { 'button_language' => $this->settings['button_language'], 'ledger_currency' => $this->get_ledger_currency(), 'estimated_order_amount' => self::get_estimated_order_amount(), + 'overriden_fields_per_country' => WC_Amazon_Payments_Advanced_Utils::get_non_required_fields_per_country(), ), $params ); diff --git a/src/js/_utils.js b/src/js/_utils.js index 7f685895..775a0190 100644 --- a/src/js/_utils.js +++ b/src/js/_utils.js @@ -121,3 +121,50 @@ export const getCheckOutFieldsLabel = ( field, billingOrShipping ) => { export const amazonPayCanMakePayment = ( { cartTotals }, { allowedCurrencies } ) => { return allowedCurrencies && allowedCurrencies.length > 0 ? allowedCurrencies.includes( cartTotals.currency_code ) : true; }; + + +/** + * Maybe override required field validation. + * + * @param {string} country The country code. + * @returns {array} + */ +export const overrideRequiredFieldValidation = ( country ) => { + let overridenFields = []; + + if ( ! window.amazon_payments_advanced || + ! window.amazon_payments_advanced.overriden_fields_per_country || + ! window.amazon_payments_advanced.overriden_fields_per_country[ country ] + ) { + return overridenFields; + } + + const fieldsToOverride = window.amazon_payments_advanced.overriden_fields_per_country[ country ]; + + for ( const field of fieldsToOverride ) { + const elem = document.getElementById( field ); + if ( ! elem || ! elem.required ) { + continue; + } + + elem.required = false; + overridenFields.push( field ); + } + + return overridenFields; +} + + +/** + * Restore the required field validation. + * + * @param {array} fields The fields to restore the required validation. + */ +export const restoreRequiredFieldValidation = ( fields ) => { + fields.forEach( field => { + const elem = document.getElementById( field ); + if ( elem ) { + elem.required = true; + } + } ); +} diff --git a/src/js/payments-methods/express/_payment-methods.js b/src/js/payments-methods/express/_payment-methods.js index 2d41ed66..f29e9aa8 100644 --- a/src/js/payments-methods/express/_payment-methods.js +++ b/src/js/payments-methods/express/_payment-methods.js @@ -1,7 +1,7 @@ /** * External dependencies */ -import { useEffect } from '@wordpress/element'; +import { useEffect, useState } from '@wordpress/element'; import { sprintf, __ } from '@wordpress/i18n'; import { decodeEntities } from '@wordpress/html-entities'; import React from 'react'; @@ -9,7 +9,7 @@ import React from 'react'; /** * Internal dependencies */ -import { getCheckOutFieldsLabel } from '../../_utils'; +import { getCheckOutFieldsLabel, overrideRequiredFieldValidation, restoreRequiredFieldValidation } from '../../_utils'; import { activateChange } from '../../_renderAmazonButton'; import { settings } from './_settings'; @@ -44,9 +44,13 @@ const AmazonPayInfo = ( props ) => { const { amazonBilling, amazonShipping } = settings.amazonAddress; + const [ overridenFields, setOverridenFields ] = useState( [] ); + useEffect( () => { const unsubscribe = props.eventRegistration.onCheckoutValidation( async () => { + restoreRequiredFieldValidation( overridenFields ); + setOverridenFields( overrideRequiredFieldValidation( shippingAddress?.country || '' ) ); for ( const shippingField in amazonShipping ) { // Values are the same as expected. Bail. if (amazonShipping[ shippingField ] === shippingAddress[ shippingField ]) { From 336a30673765e90df2d62e2e7ebffa397c68ae12 Mon Sep 17 00:00:00 2001 From: Alejandro Iglesias Date: Thu, 20 Jun 2024 10:07:10 +0200 Subject: [PATCH 13/31] refactor duplicated fields --- ...lass-wc-amazon-payments-advanced-utils.php | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/includes/class-wc-amazon-payments-advanced-utils.php b/includes/class-wc-amazon-payments-advanced-utils.php index 3e1a4363..fcb29729 100644 --- a/includes/class-wc-amazon-payments-advanced-utils.php +++ b/includes/class-wc-amazon-payments-advanced-utils.php @@ -54,15 +54,23 @@ public static function get_non_required_fields() { */ public static function get_non_required_fields_per_country() { - $non_required_fields = array( + $mapped_fields_per_country = array( 'JP' => array( - 'billing_city', - 'shipping_city', - 'billing-city', - 'shipping-city', + 'city', ), ); - return apply_filters( 'woocommerce_amazon_pa_non_required_fields_per_country', $non_required_fields ); + $non_required_fields = array(); + + foreach ( $mapped_fields_per_country as $country => $fields ) { + foreach ( $fields as $field ) { + $non_required_fields[ $country ][] = 'billing_' . $field; + $non_required_fields[ $country ][] = 'billing-' . $field; + $non_required_fields[ $country ][] = 'shipping_' . $field; + $non_required_fields[ $country ][] = 'shipping-' . $field; + } + } + + return apply_filters( 'woocommerce_amazon_pa_non_required_fields_per_country', $non_required_fields, $mapped_fields_per_country ); } } From 9f42d34d61a70af133fa662ffc1be6dfbadc0d22 Mon Sep 17 00:00:00 2001 From: Alejandro Iglesias Date: Thu, 20 Jun 2024 10:10:47 +0200 Subject: [PATCH 14/31] adjust parameter name and description --- .../class-wc-gateway-amazon-payments-advanced.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/class-wc-gateway-amazon-payments-advanced.php b/includes/class-wc-gateway-amazon-payments-advanced.php index 507c49fa..2607a9ce 100644 --- a/includes/class-wc-gateway-amazon-payments-advanced.php +++ b/includes/class-wc-gateway-amazon-payments-advanced.php @@ -1037,12 +1037,12 @@ public function display_payment_method_selected( $checkout_session = null ) { * session object. * * @param object $checkout_session The active checkout session. - * @param bool $force Whether to force the refresh of the checkout session. + * @param bool $allow_null Whether to bypass creating a new session if it's not available. * * @return boolean */ - public function has_payment_preferences( $checkout_session = null, $force = false ) { - if ( ! $force && null === $checkout_session ) { + public function has_payment_preferences( $checkout_session = null, $allow_null = false ) { + if ( ! $allow_null && null === $checkout_session ) { $checkout_session = $this->get_checkout_session(); } @@ -1057,11 +1057,11 @@ public function has_payment_preferences( $checkout_session = null, $force = fals * Returns the selected payment method from Amazon. * * @param object $checkout_session The active checkout session. - * @param bool $force Whether to force the refresh of the checkout session. + * @param bool $allow_null Whether to bypass creating a new session if it's not available. * @return string */ - public function get_selected_payment_label( $checkout_session = null, $force = false ) { - if ( ! $force && null === $checkout_session ) { + public function get_selected_payment_label( $checkout_session = null, $allow_null = false ) { + if ( ! $allow_null && null === $checkout_session ) { $checkout_session = $this->get_checkout_session(); } From 1c07c36145e4314ca5a48a510e8ce4355cf5d1b1 Mon Sep 17 00:00:00 2001 From: Alejandro Iglesias Date: Fri, 2 Aug 2024 18:44:07 +0200 Subject: [PATCH 15/31] remove not needed method --- src/js/_utils.js | 47 ------------------- .../express/_payment-methods.js | 6 +-- 2 files changed, 1 insertion(+), 52 deletions(-) diff --git a/src/js/_utils.js b/src/js/_utils.js index 775a0190..7f685895 100644 --- a/src/js/_utils.js +++ b/src/js/_utils.js @@ -121,50 +121,3 @@ export const getCheckOutFieldsLabel = ( field, billingOrShipping ) => { export const amazonPayCanMakePayment = ( { cartTotals }, { allowedCurrencies } ) => { return allowedCurrencies && allowedCurrencies.length > 0 ? allowedCurrencies.includes( cartTotals.currency_code ) : true; }; - - -/** - * Maybe override required field validation. - * - * @param {string} country The country code. - * @returns {array} - */ -export const overrideRequiredFieldValidation = ( country ) => { - let overridenFields = []; - - if ( ! window.amazon_payments_advanced || - ! window.amazon_payments_advanced.overriden_fields_per_country || - ! window.amazon_payments_advanced.overriden_fields_per_country[ country ] - ) { - return overridenFields; - } - - const fieldsToOverride = window.amazon_payments_advanced.overriden_fields_per_country[ country ]; - - for ( const field of fieldsToOverride ) { - const elem = document.getElementById( field ); - if ( ! elem || ! elem.required ) { - continue; - } - - elem.required = false; - overridenFields.push( field ); - } - - return overridenFields; -} - - -/** - * Restore the required field validation. - * - * @param {array} fields The fields to restore the required validation. - */ -export const restoreRequiredFieldValidation = ( fields ) => { - fields.forEach( field => { - const elem = document.getElementById( field ); - if ( elem ) { - elem.required = true; - } - } ); -} diff --git a/src/js/payments-methods/express/_payment-methods.js b/src/js/payments-methods/express/_payment-methods.js index f29e9aa8..c19ab0d7 100644 --- a/src/js/payments-methods/express/_payment-methods.js +++ b/src/js/payments-methods/express/_payment-methods.js @@ -9,7 +9,7 @@ import React from 'react'; /** * Internal dependencies */ -import { getCheckOutFieldsLabel, overrideRequiredFieldValidation, restoreRequiredFieldValidation } from '../../_utils'; +import { getCheckOutFieldsLabel } from '../../_utils'; import { activateChange } from '../../_renderAmazonButton'; import { settings } from './_settings'; @@ -44,13 +44,9 @@ const AmazonPayInfo = ( props ) => { const { amazonBilling, amazonShipping } = settings.amazonAddress; - const [ overridenFields, setOverridenFields ] = useState( [] ); - useEffect( () => { const unsubscribe = props.eventRegistration.onCheckoutValidation( async () => { - restoreRequiredFieldValidation( overridenFields ); - setOverridenFields( overrideRequiredFieldValidation( shippingAddress?.country || '' ) ); for ( const shippingField in amazonShipping ) { // Values are the same as expected. Bail. if (amazonShipping[ shippingField ] === shippingAddress[ shippingField ]) { From fd212e14b9a19f718899cd729f156c3eb018f46a Mon Sep 17 00:00:00 2001 From: Alejandro Iglesias Date: Fri, 2 Aug 2024 18:44:15 +0200 Subject: [PATCH 16/31] use - as city fallback --- includes/class-wc-amazon-payments-advanced-api-abstract.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-amazon-payments-advanced-api-abstract.php b/includes/class-wc-amazon-payments-advanced-api-abstract.php index eea61df3..d9dd44f7 100644 --- a/includes/class-wc-amazon-payments-advanced-api-abstract.php +++ b/includes/class-wc-amazon-payments-advanced-api-abstract.php @@ -483,7 +483,7 @@ public static function format_address( $address ) { $formatted['city'] = isset( $address->City ) ? (string) $address->City : null; if ( ! empty( $address->CountryCode ) && in_array( $address->CountryCode, array( 'JP' ) ) ) { if ( empty( $formatted['city'] ) ) { - $formatted['city'] = ''; // Force empty city + $formatted['city'] = '–'; // Force empty city } } $formatted['postcode'] = isset( $address->PostalCode ) ? (string) $address->PostalCode : null; From 9e9135669b7b97d8bf410145ea77a3942f721230 Mon Sep 17 00:00:00 2001 From: Alejandro Iglesias Date: Fri, 2 Aug 2024 19:20:09 +0200 Subject: [PATCH 17/31] fix express button not rendered on single product page --- .../class-wc-gateway-amazon-payments-advanced-abstract.php | 2 +- ...lass-wc-gateway-amazon-payments-advanced-subscriptions.php | 4 ++-- includes/class-wc-gateway-amazon-payments-advanced.php | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/includes/class-wc-gateway-amazon-payments-advanced-abstract.php b/includes/class-wc-gateway-amazon-payments-advanced-abstract.php index e3738523..5ca99387 100644 --- a/includes/class-wc-gateway-amazon-payments-advanced-abstract.php +++ b/includes/class-wc-gateway-amazon-payments-advanced-abstract.php @@ -939,7 +939,7 @@ public function checkout_button( $echo = true, $elem = 'div', $id = 'pay_with_am $subscriptions_enabled = empty( $this->settings['subscriptions_enabled'] ) || 'yes' === $this->settings['subscriptions_enabled']; $cart_contains_sub = class_exists( 'WC_Subscriptions_Cart' ) ? WC_Subscriptions_Cart::cart_contains_subscription() : false; - if ( $subscriptions_installed && ! $subscriptions_enabled && $cart_contains_sub ) { + if ( $subscriptions_installed && ! $subscriptions_enabled && $cart_contains_sub && ! is_product() ) { return; } diff --git a/includes/class-wc-gateway-amazon-payments-advanced-subscriptions.php b/includes/class-wc-gateway-amazon-payments-advanced-subscriptions.php index 79f6aaf4..2488c7bc 100644 --- a/includes/class-wc-gateway-amazon-payments-advanced-subscriptions.php +++ b/includes/class-wc-gateway-amazon-payments-advanced-subscriptions.php @@ -19,14 +19,14 @@ public function __construct() { add_filter( 'woocommerce_amazon_pa_form_fields_before_legacy', array( $this, 'add_enable_subscriptions_field' ) ); + add_filter( 'woocommerce_amazon_pa_supports', array( $this, 'add_subscription_support' ) ); + if ( 'yes' !== WC_Amazon_Payments_Advanced_API::get_settings( 'subscriptions_enabled' ) ) { return; } add_action( 'wp_loaded', array( $this, 'init_handlers' ), 12 ); - add_filter( 'woocommerce_amazon_pa_supports', array( $this, 'add_subscription_support' ) ); - // WC Subscription Hook. add_filter( 'woocommerce_subscriptions_process_payment_for_change_method_via_pay_shortcode', array( $this, 'filter_payment_method_changed_result' ), 10, 2 ); } diff --git a/includes/class-wc-gateway-amazon-payments-advanced.php b/includes/class-wc-gateway-amazon-payments-advanced.php index 14f19d93..0eed6ee4 100644 --- a/includes/class-wc-gateway-amazon-payments-advanced.php +++ b/includes/class-wc-gateway-amazon-payments-advanced.php @@ -111,6 +111,10 @@ protected function get_availability() { return false; } + if ( ! $this->possible_subscription_cart_supported() ) { + return false; + } + return true; } From 7d83a08bf9af354a8329794809ea59755a2bcede Mon Sep 17 00:00:00 2001 From: Alejandro Iglesias Date: Tue, 6 Aug 2024 17:26:27 +0200 Subject: [PATCH 18/31] explode with ideagraphic space --- includes/class-wc-amazon-payments-advanced-api-abstract.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-amazon-payments-advanced-api-abstract.php b/includes/class-wc-amazon-payments-advanced-api-abstract.php index d9dd44f7..af3ef424 100644 --- a/includes/class-wc-amazon-payments-advanced-api-abstract.php +++ b/includes/class-wc-amazon-payments-advanced-api-abstract.php @@ -391,7 +391,7 @@ public static function format_name( $name ) { } // Use fallback value for the last name to avoid field required errors. $last_name_fallback = '–'; - $names = explode( ' ', $name ); + $names = preg_split( '/ | /', $name ); return array( 'first_name' => array_shift( $names ), 'last_name' => empty( $names ) ? $last_name_fallback : implode( ' ', $names ), From 0d416f2f9e12f0cd4faa2fe60fea9c6ef5de1821 Mon Sep 17 00:00:00 2001 From: Laura Date: Mon, 30 Sep 2024 12:15:03 +0100 Subject: [PATCH 19/31] Fix Billing Phone ID getter --- src/js/payments-methods/classic/_payment-methods.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/payments-methods/classic/_payment-methods.js b/src/js/payments-methods/classic/_payment-methods.js index e5e8aad4..79e655fa 100644 --- a/src/js/payments-methods/classic/_payment-methods.js +++ b/src/js/payments-methods/classic/_payment-methods.js @@ -47,7 +47,8 @@ const AmazonPayBtn = ( props ) => { return true; } const shippingPhone = document.getElementById( 'shipping-phone' ); - const billingPhone = document.getElementById( 'phone' ); + const billingPhone = document.getElementById( 'billing-phone' ); + if ( ! shippingPhone?.value && ! billingPhone?.value ) { return { type: 'error', From de72a6b476aab504a2c512ebb91b6fe435c14a35 Mon Sep 17 00:00:00 2001 From: Laura Date: Mon, 30 Sep 2024 13:20:16 +0100 Subject: [PATCH 20/31] Fix typo on phpunit tests --- tests/phpunit/bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/bootstrap.php b/tests/phpunit/bootstrap.php index 6789b995..34c9a720 100644 --- a/tests/phpunit/bootstrap.php +++ b/tests/phpunit/bootstrap.php @@ -32,7 +32,7 @@ function _manually_load_plugin() { $_plugin_dir = dirname( __FILE__ ) . '/../../'; - require_once $_plugins_dir . '../woocommerce/woocommerce.php'; + require_once $_plugin_dir . '../woocommerce/woocommerce.php'; require_once $_plugin_dir . 'woocommerce-gateway-amazon-payments-advanced.php'; require_once $_plugin_dir . 'includes/class-wc-gateway-amazon-payments-advanced-abstract.php'; From 7d469a4a8153753e5f4a549d40fe3f5a766dbce9 Mon Sep 17 00:00:00 2001 From: Morais Junior Date: Tue, 1 Oct 2024 14:50:55 -0300 Subject: [PATCH 21/31] Fix PHP compatibility --- .../class-wc-mocker-gateway-amazon-payments-advanced.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/mockers/class-wc-mocker-gateway-amazon-payments-advanced.php b/tests/phpunit/mockers/class-wc-mocker-gateway-amazon-payments-advanced.php index 655bdd48..d249b97e 100644 --- a/tests/phpunit/mockers/class-wc-mocker-gateway-amazon-payments-advanced.php +++ b/tests/phpunit/mockers/class-wc-mocker-gateway-amazon-payments-advanced.php @@ -23,7 +23,7 @@ class WC_Mocker_Gateway_Amazon_Payments_Advanced extends WC_Gateway_Amazon_Payme * * @param int|string $order_total The order total to be set. */ - public function __construct( int|string $order_total = 50 ) { + public function __construct( $order_total = 50 ) { $this->settings = WC_Amazon_Payments_Advanced_API::get_settings(); self::$order_total = $order_total; From 5143e28d0a5ef5f2e8b7ffc7acaf0eb049adcf55 Mon Sep 17 00:00:00 2001 From: Morais Junior Date: Tue, 1 Oct 2024 17:54:45 -0300 Subject: [PATCH 22/31] Update Node and Fix CI --- .github/workflows/php-unit-on-pr.yml | 10 +++++----- tests/bin/install-phpunit-tests-dependencies.sh | 10 ++++++++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/php-unit-on-pr.yml b/.github/workflows/php-unit-on-pr.yml index 664979c1..6b54af76 100644 --- a/.github/workflows/php-unit-on-pr.yml +++ b/.github/workflows/php-unit-on-pr.yml @@ -20,7 +20,7 @@ jobs: steps: # Checkout the repository - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 # PHP setup - name: Setup PHP ${{ matrix.php }} @@ -37,14 +37,14 @@ jobs: # Use node version from .nvmrc - name: Setup NodeJS - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' # Cache composer dependencies - name: Cache composer dependencies id: composer-cache - uses: actions/cache@v3 + uses: actions/cache@v1 with: path: ./vendor key: ${{ runner.os }}-vendor-${{ hashFiles('composer.lock') }} @@ -52,7 +52,7 @@ jobs: # Cache node dependencies - name: Cache node dependencies id: node-cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ./node_modules key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }} @@ -76,7 +76,7 @@ jobs: # Prepare test environment - name: Prepare test environment run: | - bash tests/bin/install-phpunit-tests-dependencies.sh wc_apa_test root root 127.0.0.1 latest + bash tests/bin/install-phpunit-tests-dependencies.sh wc_apa_test root root 127.0.0.1 latest ${{ matrix.php }} # Run tests - name: Run tests diff --git a/tests/bin/install-phpunit-tests-dependencies.sh b/tests/bin/install-phpunit-tests-dependencies.sh index be649427..b6116935 100755 --- a/tests/bin/install-phpunit-tests-dependencies.sh +++ b/tests/bin/install-phpunit-tests-dependencies.sh @@ -11,6 +11,7 @@ DB_USER=$2 DB_PASS=$3 DB_HOST=${4-localhost} WP_VERSION=${5-latest} +PHP_VERSION=$6 TMPDIR=${TMPDIR-/tmp} TMPDIR=$(echo $TMPDIR | sed -e "s/\/$//") @@ -62,9 +63,14 @@ install_wp() { } install_woocommerce() { - WC_VERSION=$(curl https://api.wordpress.org/plugins/info/1.0/woocommerce.json | jq -r '.version') + if [ $PHP_VERSION = "7.3" ]; then + WC_VERSION="8.4.0" + echo "Warning: WooCommerce $WC_VERSION is the latest version compatible with PHP7.3" + else + WC_VERSION=$(curl https://api.wordpress.org/plugins/info/1.0/woocommerce.json | jq -r '.version') + fi - echo "Installing WooCommerce $WC_VERSION" + echo "Installing WooCommerce $WC_VERSION on PHP $PHP_VERSION" cd - download https://downloads.wordpress.org/plugin/woocommerce.$WC_VERSION.zip ../woocommerce.zip unzip -o -qq ../woocommerce.zip -d ../ From 5cd2fffffc097b072fe23429dbd3d4277eee8127 Mon Sep 17 00:00:00 2001 From: Laura Date: Thu, 3 Oct 2024 17:34:29 +0100 Subject: [PATCH 23/31] Update Amazon Pay SDK --- composer.json | 2 +- composer.lock | 1013 ++++++++++++++++++++++++++++--------------------- 2 files changed, 581 insertions(+), 434 deletions(-) diff --git a/composer.json b/composer.json index 9f3c0f2e..656d6f50 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,7 @@ "wp-cli/wp-cli-bundle": "*" }, "require": { - "amzn/amazon-pay-api-sdk-php": "2.6.2", + "amzn/amazon-pay-api-sdk-php": "2.6.7", "php": "7.*" } } diff --git a/composer.lock b/composer.lock index 7d848121..098e3937 100644 --- a/composer.lock +++ b/composer.lock @@ -4,25 +4,25 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4bf21d7c3fa868a662efd2a47651e4cb", + "content-hash": "4019e0c1ca24ae306a591a9d133a423f", "packages": [ { "name": "amzn/amazon-pay-api-sdk-php", - "version": "2.6.2", + "version": "2.6.7", "source": { "type": "git", "url": "https://github.com/amzn/amazon-pay-api-sdk-php.git", - "reference": "4583b7320e96e18fe32bef1830d7a968c0cebf49" + "reference": "bc4b8460a2a33fb83916ae7a0c6e5e577e95c43c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amzn/amazon-pay-api-sdk-php/zipball/4583b7320e96e18fe32bef1830d7a968c0cebf49", - "reference": "4583b7320e96e18fe32bef1830d7a968c0cebf49", + "url": "https://api.github.com/repos/amzn/amazon-pay-api-sdk-php/zipball/bc4b8460a2a33fb83916ae7a0c6e5e577e95c43c", + "reference": "bc4b8460a2a33fb83916ae7a0c6e5e577e95c43c", "shasum": "" }, "require": { "ext-curl": "*", - "php": ">=5.5.0", + "php": ">=5.6.1", "phpseclib/phpseclib": "~3.0" }, "require-dev": { @@ -57,22 +57,22 @@ ], "support": { "issues": "https://github.com/amzn/amazon-pay-api-sdk-php/issues", - "source": "https://github.com/amzn/amazon-pay-api-sdk-php/tree/2.6.2" + "source": "https://github.com/amzn/amazon-pay-api-sdk-php/tree/2.6.7" }, - "time": "2023-06-29T07:33:20+00:00" + "time": "2024-09-11T06:57:16+00:00" }, { "name": "paragonie/constant_time_encoding", - "version": "v2.6.3", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/paragonie/constant_time_encoding.git", - "reference": "58c3f47f650c94ec05a151692652a868995d2938" + "reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/58c3f47f650c94ec05a151692652a868995d2938", - "reference": "58c3f47f650c94ec05a151692652a868995d2938", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/52a0d99e69f56b9ec27ace92ba56897fe6993105", + "reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105", "shasum": "" }, "require": { @@ -126,7 +126,7 @@ "issues": "https://github.com/paragonie/constant_time_encoding/issues", "source": "https://github.com/paragonie/constant_time_encoding" }, - "time": "2022-06-14T06:56:20+00:00" + "time": "2024-05-08T12:18:48+00:00" }, { "name": "paragonie/random_compat", @@ -180,20 +180,20 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.35", + "version": "3.0.42", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "4b1827beabce71953ca479485c0ae9c51287f2fe" + "reference": "db92f1b1987b12b13f248fe76c3a52cadb67bb98" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/4b1827beabce71953ca479485c0ae9c51287f2fe", - "reference": "4b1827beabce71953ca479485c0ae9c51287f2fe", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/db92f1b1987b12b13f248fe76c3a52cadb67bb98", + "reference": "db92f1b1987b12b13f248fe76c3a52cadb67bb98", "shasum": "" }, "require": { - "paragonie/constant_time_encoding": "^1|^2", + "paragonie/constant_time_encoding": "^1|^2|^3", "paragonie/random_compat": "^1.4|^2.0|^9.99.99", "php": ">=5.6.1" }, @@ -270,7 +270,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.35" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.42" }, "funding": [ { @@ -286,22 +286,22 @@ "type": "tidelift" } ], - "time": "2023-12-29T01:59:53+00:00" + "time": "2024-09-16T03:06:04+00:00" } ], "packages-dev": [ { "name": "composer/ca-bundle", - "version": "1.5.0", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "0c5ccfcfea312b5c5a190a21ac5cef93f74baf99" + "reference": "48a792895a2b7a6ee65dd5442c299d7b835b6137" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/0c5ccfcfea312b5c5a190a21ac5cef93f74baf99", - "reference": "0c5ccfcfea312b5c5a190a21ac5cef93f74baf99", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/48a792895a2b7a6ee65dd5442c299d7b835b6137", + "reference": "48a792895a2b7a6ee65dd5442c299d7b835b6137", "shasum": "" }, "require": { @@ -311,8 +311,8 @@ }, "require-dev": { "phpstan/phpstan": "^1.10", - "psr/log": "^1.0", - "symfony/phpunit-bridge": "^4.2 || ^5", + "phpunit/phpunit": "^8 || ^9", + "psr/log": "^1.0 || ^2.0 || ^3.0", "symfony/process": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, "type": "library", @@ -348,7 +348,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.5.0" + "source": "https://github.com/composer/ca-bundle/tree/1.5.2" }, "funding": [ { @@ -364,20 +364,20 @@ "type": "tidelift" } ], - "time": "2024-03-15T14:00:32+00:00" + "time": "2024-09-25T07:49:53+00:00" }, { "name": "composer/class-map-generator", - "version": "1.1.1", + "version": "1.3.4", "source": { "type": "git", "url": "https://github.com/composer/class-map-generator.git", - "reference": "8286a62d243312ed99b3eee20d5005c961adb311" + "reference": "b1b3fd0b4eaf3ddf3ee230bc340bf3fff454a1a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/class-map-generator/zipball/8286a62d243312ed99b3eee20d5005c961adb311", - "reference": "8286a62d243312ed99b3eee20d5005c961adb311", + "url": "https://api.github.com/repos/composer/class-map-generator/zipball/b1b3fd0b4eaf3ddf3ee230bc340bf3fff454a1a3", + "reference": "b1b3fd0b4eaf3ddf3ee230bc340bf3fff454a1a3", "shasum": "" }, "require": { @@ -421,7 +421,7 @@ ], "support": { "issues": "https://github.com/composer/class-map-generator/issues", - "source": "https://github.com/composer/class-map-generator/tree/1.1.1" + "source": "https://github.com/composer/class-map-generator/tree/1.3.4" }, "funding": [ { @@ -437,28 +437,28 @@ "type": "tidelift" } ], - "time": "2024-03-15T12:53:41+00:00" + "time": "2024-06-12T14:13:04+00:00" }, { "name": "composer/composer", - "version": "2.7.2", + "version": "2.7.7", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "b826edb791571ab1eaf281eb1bd6e181a1192adc" + "reference": "291942978f39435cf904d33739f98d7d4eca7b23" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/b826edb791571ab1eaf281eb1bd6e181a1192adc", - "reference": "b826edb791571ab1eaf281eb1bd6e181a1192adc", + "url": "https://api.github.com/repos/composer/composer/zipball/291942978f39435cf904d33739f98d7d4eca7b23", + "reference": "291942978f39435cf904d33739f98d7d4eca7b23", "shasum": "" }, "require": { "composer/ca-bundle": "^1.0", - "composer/class-map-generator": "^1.0", + "composer/class-map-generator": "^1.3.3", "composer/metadata-minifier": "^1.0", "composer/pcre": "^2.1 || ^3.1", - "composer/semver": "^3.2.5", + "composer/semver": "^3.3", "composer/spdx-licenses": "^1.5.7", "composer/xdebug-handler": "^2.0.2 || ^3.0.3", "justinrainbow/json-schema": "^5.2.11", @@ -477,11 +477,11 @@ "symfony/process": "^5.4 || ^6.0 || ^7" }, "require-dev": { - "phpstan/phpstan": "^1.9.3", - "phpstan/phpstan-deprecation-rules": "^1", - "phpstan/phpstan-phpunit": "^1.0", - "phpstan/phpstan-strict-rules": "^1", - "phpstan/phpstan-symfony": "^1.2.10", + "phpstan/phpstan": "^1.11.0", + "phpstan/phpstan-deprecation-rules": "^1.2.0", + "phpstan/phpstan-phpunit": "^1.4.0", + "phpstan/phpstan-strict-rules": "^1.6.0", + "phpstan/phpstan-symfony": "^1.4.0", "symfony/phpunit-bridge": "^6.4.1 || ^7.0.1" }, "suggest": { @@ -535,7 +535,7 @@ "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/composer/issues", "security": "https://github.com/composer/composer/security/policy", - "source": "https://github.com/composer/composer/tree/2.7.2" + "source": "https://github.com/composer/composer/tree/2.7.7" }, "funding": [ { @@ -551,7 +551,7 @@ "type": "tidelift" } ], - "time": "2024-03-11T16:12:18+00:00" + "time": "2024-06-10T20:11:12+00:00" }, { "name": "composer/metadata-minifier", @@ -695,24 +695,24 @@ }, { "name": "composer/semver", - "version": "3.4.0", + "version": "3.4.3", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" + "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", - "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", + "url": "https://api.github.com/repos/composer/semver/zipball/4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", + "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", "shasum": "" }, "require": { "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^1.4", - "symfony/phpunit-bridge": "^4.2 || ^5" + "phpstan/phpstan": "^1.11", + "symfony/phpunit-bridge": "^3 || ^7" }, "type": "library", "extra": { @@ -756,7 +756,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.4.0" + "source": "https://github.com/composer/semver/tree/3.4.3" }, "funding": [ { @@ -772,7 +772,7 @@ "type": "tidelift" } ], - "time": "2023-08-31T09:50:34+00:00" + "time": "2024-09-19T14:15:21+00:00" }, { "name": "composer/spdx-licenses", @@ -856,16 +856,16 @@ }, { "name": "composer/xdebug-handler", - "version": "3.0.4", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255" + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/4f988f8fdf580d53bdb2d1278fe93d1ed5462255", - "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", "shasum": "" }, "require": { @@ -902,7 +902,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.4" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.5" }, "funding": [ { @@ -918,7 +918,7 @@ "type": "tidelift" } ], - "time": "2024-03-26T18:29:49+00:00" + "time": "2024-05-06T16:37:16+00:00" }, { "name": "dealerdirect/phpcodesniffer-composer-installer", @@ -990,6 +990,53 @@ }, "time": "2020-06-25T14:57:39+00:00" }, + { + "name": "doctrine/deprecations", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "phpstan/phpstan": "1.4.10 || 1.10.15", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "0.18.4", + "psr/log": "^1 || ^2 || ^3", + "vimeo/psalm": "4.30.0 || 5.12.0" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/1.1.3" + }, + "time": "2024-01-30T19:34:25+00:00" + }, { "name": "doctrine/instantiator", "version": "1.5.0", @@ -1120,16 +1167,16 @@ }, { "name": "gettext/gettext", - "version": "v4.8.11", + "version": "v4.8.12", "source": { "type": "git", "url": "https://github.com/php-gettext/Gettext.git", - "reference": "b632aaf5e4579d0b2ae8bc61785e238bff4c5156" + "reference": "11af89ee6c087db3cf09ce2111a150bca5c46e12" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-gettext/Gettext/zipball/b632aaf5e4579d0b2ae8bc61785e238bff4c5156", - "reference": "b632aaf5e4579d0b2ae8bc61785e238bff4c5156", + "url": "https://api.github.com/repos/php-gettext/Gettext/zipball/11af89ee6c087db3cf09ce2111a150bca5c46e12", + "reference": "11af89ee6c087db3cf09ce2111a150bca5c46e12", "shasum": "" }, "require": { @@ -1181,7 +1228,7 @@ "support": { "email": "oom@oscarotero.com", "issues": "https://github.com/oscarotero/Gettext/issues", - "source": "https://github.com/php-gettext/Gettext/tree/v4.8.11" + "source": "https://github.com/php-gettext/Gettext/tree/v4.8.12" }, "funding": [ { @@ -1197,7 +1244,7 @@ "type": "patreon" } ], - "time": "2023-08-14T15:15:05+00:00" + "time": "2024-05-18T10:25:07+00:00" }, { "name": "gettext/languages", @@ -1275,20 +1322,20 @@ }, { "name": "justinrainbow/json-schema", - "version": "v5.2.13", + "version": "5.3.0", "source": { "type": "git", - "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793" + "url": "https://github.com/jsonrainbow/json-schema.git", + "reference": "feb2ca6dd1cebdaf1ed60a4c8de2e53ce11c4fd8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/fbbe7e5d79f618997bc3332a6f49246036c45793", - "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793", + "url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/feb2ca6dd1cebdaf1ed60a4c8de2e53ce11c4fd8", + "reference": "feb2ca6dd1cebdaf1ed60a4c8de2e53ce11c4fd8", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "require-dev": { "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", @@ -1299,11 +1346,6 @@ "bin/validate-json" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, "autoload": { "psr-4": { "JsonSchema\\": "src/JsonSchema/" @@ -1338,23 +1380,23 @@ "schema" ], "support": { - "issues": "https://github.com/justinrainbow/json-schema/issues", - "source": "https://github.com/justinrainbow/json-schema/tree/v5.2.13" + "issues": "https://github.com/jsonrainbow/json-schema/issues", + "source": "https://github.com/jsonrainbow/json-schema/tree/5.3.0" }, - "time": "2023-09-26T02:20:38+00:00" + "time": "2024-07-06T21:00:26+00:00" }, { "name": "mck89/peast", - "version": "v1.16.2", + "version": "v1.16.3", "source": { "type": "git", "url": "https://github.com/mck89/peast.git", - "reference": "2791b08ffcc1862fe18eef85675da3aa58c406fe" + "reference": "645ec21b650bc2aced18285c85f220d22afc1430" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mck89/peast/zipball/2791b08ffcc1862fe18eef85675da3aa58c406fe", - "reference": "2791b08ffcc1862fe18eef85675da3aa58c406fe", + "url": "https://api.github.com/repos/mck89/peast/zipball/645ec21b650bc2aced18285c85f220d22afc1430", + "reference": "645ec21b650bc2aced18285c85f220d22afc1430", "shasum": "" }, "require": { @@ -1367,7 +1409,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.16.2-dev" + "dev-master": "1.16.3-dev" } }, "autoload": { @@ -1388,9 +1430,9 @@ "description": "Peast is PHP library that generates AST for JavaScript code", "support": { "issues": "https://github.com/mck89/peast/issues", - "source": "https://github.com/mck89/peast/tree/v1.16.2" + "source": "https://github.com/mck89/peast/tree/v1.16.3" }, - "time": "2024-03-05T09:16:03+00:00" + "time": "2024-07-23T14:00:32+00:00" }, { "name": "mustache/mustache", @@ -1444,16 +1486,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.11.1", + "version": "1.12.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", "shasum": "" }, "require": { @@ -1461,11 +1503,12 @@ }, "conflict": { "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { "doctrine/collections": "^1.6.8", "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", @@ -1491,7 +1534,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" }, "funding": [ { @@ -1499,7 +1542,7 @@ "type": "tidelift" } ], - "time": "2023-03-08T13:26:56+00:00" + "time": "2024-06-12T14:39:25+00:00" }, { "name": "nb/oxymel", @@ -1548,25 +1591,25 @@ }, { "name": "nikic/php-parser", - "version": "v4.18.0", + "version": "v4.19.4", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999" + "reference": "715f4d25e225bc47b293a8b997fe6ce99bf987d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999", - "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/715f4d25e225bc47b293a8b997fe6ce99bf987d2", + "reference": "715f4d25e225bc47b293a8b997fe6ce99bf987d2", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.1" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/php-parse" @@ -1598,26 +1641,27 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.19.4" }, - "time": "2023-12-10T21:03:43+00:00" + "time": "2024-09-29T15:01:53+00:00" }, { "name": "phar-io/manifest", - "version": "2.0.3", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + "reference": "54750ef60c58e43759730615a392c31c80e23176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-phar": "*", "ext-xmlwriter": "*", "phar-io/version": "^3.0.1", @@ -1658,9 +1702,15 @@ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" + "source": "https://github.com/phar-io/manifest/tree/2.0.4" }, - "time": "2021-07-20T11:28:43+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" }, { "name": "phar-io/version", @@ -1759,29 +1809,31 @@ }, { "name": "php-stubs/wordpress-stubs", - "version": "v5.9.6", + "version": "v5.9.9", "source": { "type": "git", "url": "https://github.com/php-stubs/wordpress-stubs.git", - "reference": "6a18d938d0aef39d091505a4a35b025fb6c10098" + "reference": "06c51c4863659ea9e9f4c2a23293728a677cb059" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/6a18d938d0aef39d091505a4a35b025fb6c10098", - "reference": "6a18d938d0aef39d091505a4a35b025fb6c10098", + "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/06c51c4863659ea9e9f4c2a23293728a677cb059", + "reference": "06c51c4863659ea9e9f4c2a23293728a677cb059", "shasum": "" }, "require-dev": { - "nikic/php-parser": "< 4.12.0", - "php": "~7.3 || ~8.0", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "nikic/php-parser": "^4.13", + "php": "^7.4 || ~8.0.0", "php-stubs/generator": "^0.8.3", - "phpdocumentor/reflection-docblock": "^5.3", - "phpstan/phpstan": "^1.10.12", - "phpunit/phpunit": "^9.5" + "phpdocumentor/reflection-docblock": "5.3", + "phpstan/phpstan": "^1.10.49", + "phpunit/phpunit": "^9.5", + "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^0.11" }, "suggest": { "paragonie/sodium_compat": "Pure PHP implementation of libsodium", - "symfony/polyfill-php73": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "symfony/polyfill-php80": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", "szepeviktor/phpstan-wordpress": "WordPress extensions for PHPStan" }, "type": "library", @@ -1798,9 +1850,9 @@ ], "support": { "issues": "https://github.com/php-stubs/wordpress-stubs/issues", - "source": "https://github.com/php-stubs/wordpress-stubs/tree/v5.9.6" + "source": "https://github.com/php-stubs/wordpress-stubs/tree/v5.9.9" }, - "time": "2023-05-18T04:34:27+00:00" + "time": "2024-04-14T17:16:00+00:00" }, { "name": "phpcompatibility/php-compatibility", @@ -1866,28 +1918,28 @@ }, { "name": "phpcompatibility/phpcompatibility-paragonie", - "version": "1.3.2", + "version": "1.3.3", "source": { "type": "git", "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git", - "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26" + "reference": "293975b465e0e709b571cbf0c957c6c0a7b9a2ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/bba5a9dfec7fcfbd679cfaf611d86b4d3759da26", - "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/293975b465e0e709b571cbf0c957c6c0a7b9a2ac", + "reference": "293975b465e0e709b571cbf0c957c6c0a7b9a2ac", "shasum": "" }, "require": { "phpcompatibility/php-compatibility": "^9.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", "paragonie/random_compat": "dev-master", "paragonie/sodium_compat": "dev-master" }, "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." }, "type": "phpcodesniffer-standard", @@ -1917,9 +1969,24 @@ ], "support": { "issues": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/issues", + "security": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/security/policy", "source": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie" }, - "time": "2022-10-25T01:46:02+00:00" + "funding": [ + { + "url": "https://github.com/PHPCompatibility", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2024-04-24T21:30:46+00:00" }, { "name": "phpcompatibility/phpcompatibility-wp", @@ -2087,25 +2154,33 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.6.1", + "version": "1.8.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "77a32518733312af16a44300404e945338981de3" + "reference": "153ae662783729388a584b4361f2545e4d841e3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", - "reference": "77a32518733312af16a44300404e945338981de3", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/153ae662783729388a584b4361f2545e4d841e3c", + "reference": "153ae662783729388a584b4361f2545e4d841e3c", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" + "doctrine/deprecations": "^1.0", + "php": "^7.3 || ^8.0", + "phpdocumentor/reflection-common": "^2.0", + "phpstan/phpdoc-parser": "^1.13" }, "require-dev": { "ext-tokenizer": "*", - "psalm/phar": "^4.8" + "phpbench/phpbench": "^1.2", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" }, "type": "library", "extra": { @@ -2131,30 +2206,30 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.8.2" }, - "time": "2022-03-15T21:29:03+00:00" + "time": "2024-02-23T11:10:43+00:00" }, { "name": "phpspec/prophecy", - "version": "v1.18.0", + "version": "v1.19.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "d4f454f7e1193933f04e6500de3e79191648ed0c" + "reference": "67a759e7d8746d501c41536ba40cd9c0a07d6a87" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d4f454f7e1193933f04e6500de3e79191648ed0c", - "reference": "d4f454f7e1193933f04e6500de3e79191648ed0c", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/67a759e7d8746d501c41536ba40cd9c0a07d6a87", + "reference": "67a759e7d8746d501c41536ba40cd9c0a07d6a87", "shasum": "" }, "require": { "doctrine/instantiator": "^1.2 || ^2.0", "php": "^7.2 || 8.0.* || 8.1.* || 8.2.* || 8.3.*", "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0 || ^5.0", - "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0" + "sebastian/comparator": "^3.0 || ^4.0 || ^5.0 || ^6.0", + "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0 || ^6.0" }, "require-dev": { "phpspec/phpspec": "^6.0 || ^7.0", @@ -2200,9 +2275,9 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.18.0" + "source": "https://github.com/phpspec/prophecy/tree/v1.19.0" }, - "time": "2023-12-07T16:22:33+00:00" + "time": "2024-02-29T11:52:51+00:00" }, { "name": "phpstan/extension-installer", @@ -2249,6 +2324,53 @@ }, "time": "2020-12-13T13:06:13+00:00" }, + { + "name": "phpstan/phpdoc-parser", + "version": "1.32.0", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "6ca22b154efdd9e3c68c56f5d94670920a1c19a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/6ca22b154efdd9e3c68c56f5d94670920a1c19a4", + "reference": "6ca22b154efdd9e3c68c56f5d94670920a1c19a4", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/annotations": "^2.0", + "nikic/php-parser": "^4.15", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5", + "symfony/process": "^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "support": { + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.32.0" + }, + "time": "2024-09-26T07:23:32+00:00" + }, { "name": "phpstan/phpstan", "version": "0.12.100", @@ -2311,35 +2433,35 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.30", + "version": "9.2.32", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089" + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca2bd87d2f9215904682a9cb9bb37dda98e76089", - "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.18 || ^5.0", + "nikic/php-parser": "^4.19.1 || ^5.1.0", "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-text-template": "^2.0.4", + "sebastian/code-unit-reverse-lookup": "^2.0.3", + "sebastian/complexity": "^2.0.3", + "sebastian/environment": "^5.1.5", + "sebastian/lines-of-code": "^1.0.4", + "sebastian/version": "^3.0.2", + "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.6" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -2348,7 +2470,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "9.2.x-dev" } }, "autoload": { @@ -2377,7 +2499,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.30" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" }, "funding": [ { @@ -2385,7 +2507,7 @@ "type": "github" } ], - "time": "2023-12-22T06:47:57+00:00" + "time": "2024-08-22T04:23:01+00:00" }, { "name": "phpunit/php-file-iterator", @@ -2831,16 +2953,16 @@ }, { "name": "react/promise", - "version": "v3.1.0", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/reactphp/promise.git", - "reference": "e563d55d1641de1dea9f5e84f3cccc66d2bfe02c" + "reference": "8a164643313c71354582dc850b42b33fa12a4b63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/e563d55d1641de1dea9f5e84f3cccc66d2bfe02c", - "reference": "e563d55d1641de1dea9f5e84f3cccc66d2bfe02c", + "url": "https://api.github.com/repos/reactphp/promise/zipball/8a164643313c71354582dc850b42b33fa12a4b63", + "reference": "8a164643313c71354582dc850b42b33fa12a4b63", "shasum": "" }, "require": { @@ -2892,7 +3014,7 @@ ], "support": { "issues": "https://github.com/reactphp/promise/issues", - "source": "https://github.com/reactphp/promise/tree/v3.1.0" + "source": "https://github.com/reactphp/promise/tree/v3.2.0" }, "funding": [ { @@ -2900,20 +3022,20 @@ "type": "open_collective" } ], - "time": "2023-11-16T16:21:57+00:00" + "time": "2024-05-24T10:39:05+00:00" }, { "name": "sebastian/cli-parser", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", "shasum": "" }, "require": { @@ -2948,7 +3070,7 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" }, "funding": [ { @@ -2956,7 +3078,7 @@ "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2024-03-02T06:27:43+00:00" }, { "name": "sebastian/code-unit", @@ -3202,16 +3324,16 @@ }, { "name": "sebastian/diff", - "version": "4.0.5", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", "shasum": "" }, "require": { @@ -3256,7 +3378,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" }, "funding": [ { @@ -3264,7 +3386,7 @@ "type": "github" } ], - "time": "2023-05-07T05:35:17+00:00" + "time": "2024-03-02T06:30:58+00:00" }, { "name": "sebastian/environment", @@ -3331,16 +3453,16 @@ }, { "name": "sebastian/exporter", - "version": "4.0.5", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", "shasum": "" }, "require": { @@ -3396,7 +3518,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" }, "funding": [ { @@ -3404,20 +3526,20 @@ "type": "github" } ], - "time": "2022-09-14T06:03:37+00:00" + "time": "2024-03-02T06:33:00+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.6", + "version": "5.0.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bde739e7565280bda77be70044ac1047bc007e34" + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", - "reference": "bde739e7565280bda77be70044ac1047bc007e34", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", "shasum": "" }, "require": { @@ -3460,7 +3582,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" }, "funding": [ { @@ -3468,7 +3590,7 @@ "type": "github" } ], - "time": "2023-08-02T09:26:13+00:00" + "time": "2024-03-02T06:35:11+00:00" }, { "name": "sebastian/lines-of-code", @@ -3704,16 +3826,16 @@ }, { "name": "sebastian/resource-operations", - "version": "3.0.3", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", "shasum": "" }, "require": { @@ -3725,7 +3847,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -3746,8 +3868,7 @@ "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" }, "funding": [ { @@ -3755,7 +3876,7 @@ "type": "github" } ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2024-03-14T16:00:52+00:00" }, { "name": "sebastian/type", @@ -3868,23 +3989,23 @@ }, { "name": "seld/jsonlint", - "version": "1.10.2", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "9bb7db07b5d66d90f6ebf542f09fc67d800e5259" + "reference": "1748aaf847fc731cfad7725aec413ee46f0cc3a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/9bb7db07b5d66d90f6ebf542f09fc67d800e5259", - "reference": "9bb7db07b5d66d90f6ebf542f09fc67d800e5259", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/1748aaf847fc731cfad7725aec413ee46f0cc3a2", + "reference": "1748aaf847fc731cfad7725aec413ee46f0cc3a2", "shasum": "" }, "require": { "php": "^5.3 || ^7.0 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^1.5", + "phpstan/phpstan": "^1.11", "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^8.5.13" }, "bin": [ @@ -3916,7 +4037,7 @@ ], "support": { "issues": "https://github.com/Seldaek/jsonlint/issues", - "source": "https://github.com/Seldaek/jsonlint/tree/1.10.2" + "source": "https://github.com/Seldaek/jsonlint/tree/1.11.0" }, "funding": [ { @@ -3928,7 +4049,7 @@ "type": "tidelift" } ], - "time": "2024-02-07T12:57:50+00:00" + "time": "2024-07-11T14:55:45+00:00" }, { "name": "seld/phar-utils", @@ -4041,16 +4162,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.8.0", + "version": "3.10.3", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "5805f7a4e4958dbb5e944ef1e6edae0a303765e7" + "reference": "62d32998e820bddc40f99f8251958aed187a5c9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/5805f7a4e4958dbb5e944ef1e6edae0a303765e7", - "reference": "5805f7a4e4958dbb5e944ef1e6edae0a303765e7", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/62d32998e820bddc40f99f8251958aed187a5c9c", + "reference": "62d32998e820bddc40f99f8251958aed187a5c9c", "shasum": "" }, "require": { @@ -4060,11 +4181,11 @@ "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" }, "bin": [ - "bin/phpcs", - "bin/phpcbf" + "bin/phpcbf", + "bin/phpcs" ], "type": "library", "extra": { @@ -4117,20 +4238,20 @@ "type": "open_collective" } ], - "time": "2023-12-08T12:32:31+00:00" + "time": "2024-09-18T10:38:58+00:00" }, { "name": "symfony/console", - "version": "v5.4.36", + "version": "v5.4.44", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "39f75d9d73d0c11952fdcecf4877b4d0f62a8f6e" + "reference": "5b5a0aa66e3296e303e22490f90f521551835a83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/39f75d9d73d0c11952fdcecf4877b4d0f62a8f6e", - "reference": "39f75d9d73d0c11952fdcecf4877b4d0f62a8f6e", + "url": "https://api.github.com/repos/symfony/console/zipball/5b5a0aa66e3296e303e22490f90f521551835a83", + "reference": "5b5a0aa66e3296e303e22490f90f521551835a83", "shasum": "" }, "require": { @@ -4200,7 +4321,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.36" + "source": "https://github.com/symfony/console/tree/v5.4.44" }, "funding": [ { @@ -4216,7 +4337,7 @@ "type": "tidelift" } ], - "time": "2024-02-20T16:33:57+00:00" + "time": "2024-09-20T07:56:40+00:00" }, { "name": "symfony/deprecation-contracts", @@ -4287,16 +4408,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.4.38", + "version": "v5.4.44", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "899330a01056077271e2f614c7b28b0379a671eb" + "reference": "76c3818964e9d32be3862c9318ae3ba9aa280ddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/899330a01056077271e2f614c7b28b0379a671eb", - "reference": "899330a01056077271e2f614c7b28b0379a671eb", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/76c3818964e9d32be3862c9318ae3ba9aa280ddc", + "reference": "76c3818964e9d32be3862c9318ae3ba9aa280ddc", "shasum": "" }, "require": { @@ -4305,6 +4426,9 @@ "symfony/polyfill-mbstring": "~1.8", "symfony/polyfill-php80": "^1.16" }, + "require-dev": { + "symfony/process": "^5.4|^6.4" + }, "type": "library", "autoload": { "psr-4": { @@ -4331,7 +4455,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.38" + "source": "https://github.com/symfony/filesystem/tree/v5.4.44" }, "funding": [ { @@ -4347,20 +4471,20 @@ "type": "tidelift" } ], - "time": "2024-03-21T08:05:07+00:00" + "time": "2024-09-16T14:52:48+00:00" }, { "name": "symfony/finder", - "version": "v5.4.35", + "version": "v5.4.43", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "abe6d6f77d9465fed3cd2d029b29d03b56b56435" + "reference": "ae25a9145a900764158d439653d5630191155ca0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/abe6d6f77d9465fed3cd2d029b29d03b56b56435", - "reference": "abe6d6f77d9465fed3cd2d029b29d03b56b56435", + "url": "https://api.github.com/repos/symfony/finder/zipball/ae25a9145a900764158d439653d5630191155ca0", + "reference": "ae25a9145a900764158d439653d5630191155ca0", "shasum": "" }, "require": { @@ -4394,7 +4518,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.35" + "source": "https://github.com/symfony/finder/tree/v5.4.43" }, "funding": [ { @@ -4410,24 +4534,24 @@ "type": "tidelift" } ], - "time": "2024-01-23T13:51:25+00:00" + "time": "2024-08-13T14:03:51+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", - "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-ctype": "*" @@ -4473,7 +4597,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" }, "funding": [ { @@ -4489,24 +4613,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f" + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f", - "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance" @@ -4551,7 +4675,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" }, "funding": [ { @@ -4567,24 +4691,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" + "reference": "3833d7255cc303546435cb650316bff708a1c75c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", - "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", + "reference": "3833d7255cc303546435cb650316bff708a1c75c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance" @@ -4632,7 +4756,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" }, "funding": [ { @@ -4648,24 +4772,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-mbstring": "*" @@ -4712,7 +4836,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" }, "funding": [ { @@ -4728,30 +4852,27 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.28.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5" + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5", - "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb", + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4791,7 +4912,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.31.0" }, "funding": [ { @@ -4807,24 +4928,24 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { @@ -4871,7 +4992,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" }, "funding": [ { @@ -4887,24 +5008,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d" + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/c565ad1e63f30e7477fc40738343c62b40bc672d", - "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { @@ -4947,7 +5068,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0" }, "funding": [ { @@ -4963,20 +5084,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/process", - "version": "v5.4.36", + "version": "v5.4.44", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "4fdf34004f149cc20b2f51d7d119aa500caad975" + "reference": "1b9fa82b5c62cd49da8c9e3952dd8531ada65096" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/4fdf34004f149cc20b2f51d7d119aa500caad975", - "reference": "4fdf34004f149cc20b2f51d7d119aa500caad975", + "url": "https://api.github.com/repos/symfony/process/zipball/1b9fa82b5c62cd49da8c9e3952dd8531ada65096", + "reference": "1b9fa82b5c62cd49da8c9e3952dd8531ada65096", "shasum": "" }, "require": { @@ -5009,7 +5130,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.36" + "source": "https://github.com/symfony/process/tree/v5.4.44" }, "funding": [ { @@ -5025,7 +5146,7 @@ "type": "tidelift" } ], - "time": "2024-02-12T15:49:53+00:00" + "time": "2024-09-17T12:46:43+00:00" }, { "name": "symfony/service-contracts", @@ -5112,16 +5233,16 @@ }, { "name": "symfony/string", - "version": "v5.4.36", + "version": "v5.4.44", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "4e232c83622bd8cd32b794216aa29d0d266d353b" + "reference": "832caa16b6d9aac6bf11747315225f5aba384c24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/4e232c83622bd8cd32b794216aa29d0d266d353b", - "reference": "4e232c83622bd8cd32b794216aa29d0d266d353b", + "url": "https://api.github.com/repos/symfony/string/zipball/832caa16b6d9aac6bf11747315225f5aba384c24", + "reference": "832caa16b6d9aac6bf11747315225f5aba384c24", "shasum": "" }, "require": { @@ -5178,7 +5299,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.36" + "source": "https://github.com/symfony/string/tree/v5.4.44" }, "funding": [ { @@ -5194,7 +5315,7 @@ "type": "tidelift" } ], - "time": "2024-02-01T08:49:30+00:00" + "time": "2024-09-20T07:56:40+00:00" }, { "name": "szepeviktor/phpstan-wordpress", @@ -5262,16 +5383,16 @@ }, { "name": "theseer/tokenizer", - "version": "1.2.2", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", - "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { @@ -5300,7 +5421,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.2" + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" }, "funding": [ { @@ -5308,7 +5429,7 @@ "type": "github" } ], - "time": "2023-11-20T00:12:19+00:00" + "time": "2024-03-03T12:36:25+00:00" }, { "name": "webmozart/assert", @@ -5414,16 +5535,16 @@ }, { "name": "wp-cli/cache-command", - "version": "v2.1.2", + "version": "v2.1.3", "source": { "type": "git", "url": "https://github.com/wp-cli/cache-command.git", - "reference": "205c004ce6127c605e4a71840a6f0b5be72b0517" + "reference": "1dbb59e5ed126b9a2fa9d521d29910f3f4eb0f97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/cache-command/zipball/205c004ce6127c605e4a71840a6f0b5be72b0517", - "reference": "205c004ce6127c605e4a71840a6f0b5be72b0517", + "url": "https://api.github.com/repos/wp-cli/cache-command/zipball/1dbb59e5ed126b9a2fa9d521d29910f3f4eb0f97", + "reference": "1dbb59e5ed126b9a2fa9d521d29910f3f4eb0f97", "shasum": "" }, "require": { @@ -5483,9 +5604,9 @@ "homepage": "https://github.com/wp-cli/cache-command", "support": { "issues": "https://github.com/wp-cli/cache-command/issues", - "source": "https://github.com/wp-cli/cache-command/tree/v2.1.2" + "source": "https://github.com/wp-cli/cache-command/tree/v2.1.3" }, - "time": "2024-01-11T14:00:20+00:00" + "time": "2024-04-26T14:54:22+00:00" }, { "name": "wp-cli/checksum-command", @@ -5548,16 +5669,16 @@ }, { "name": "wp-cli/config-command", - "version": "v2.3.3", + "version": "v2.3.6", "source": { "type": "git", "url": "https://github.com/wp-cli/config-command.git", - "reference": "890b6e3c8fd945dcad2bff4bf565ba6dfb33e35d" + "reference": "82a64ae0dbd8bc91e2bf0446666ae24650223775" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/config-command/zipball/890b6e3c8fd945dcad2bff4bf565ba6dfb33e35d", - "reference": "890b6e3c8fd945dcad2bff4bf565ba6dfb33e35d", + "url": "https://api.github.com/repos/wp-cli/config-command/zipball/82a64ae0dbd8bc91e2bf0446666ae24650223775", + "reference": "82a64ae0dbd8bc91e2bf0446666ae24650223775", "shasum": "" }, "require": { @@ -5616,22 +5737,22 @@ "homepage": "https://github.com/wp-cli/config-command", "support": { "issues": "https://github.com/wp-cli/config-command/issues", - "source": "https://github.com/wp-cli/config-command/tree/v2.3.3" + "source": "https://github.com/wp-cli/config-command/tree/v2.3.6" }, - "time": "2023-12-21T10:01:16+00:00" + "time": "2024-08-05T13:34:06+00:00" }, { "name": "wp-cli/core-command", - "version": "v2.1.17", + "version": "v2.1.18", "source": { "type": "git", "url": "https://github.com/wp-cli/core-command.git", - "reference": "dcac4c36a3c596f1c81779bdbaa0c5f508f14075" + "reference": "f7580f93fe66a5584fa7b7c42bd2c0c1435c9d2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/core-command/zipball/dcac4c36a3c596f1c81779bdbaa0c5f508f14075", - "reference": "dcac4c36a3c596f1c81779bdbaa0c5f508f14075", + "url": "https://api.github.com/repos/wp-cli/core-command/zipball/f7580f93fe66a5584fa7b7c42bd2c0c1435c9d2e", + "reference": "f7580f93fe66a5584fa7b7c42bd2c0c1435c9d2e", "shasum": "" }, "require": { @@ -5687,22 +5808,22 @@ "homepage": "https://github.com/wp-cli/core-command", "support": { "issues": "https://github.com/wp-cli/core-command/issues", - "source": "https://github.com/wp-cli/core-command/tree/v2.1.17" + "source": "https://github.com/wp-cli/core-command/tree/v2.1.18" }, - "time": "2024-01-11T11:03:57+00:00" + "time": "2024-04-12T09:36:36+00:00" }, { "name": "wp-cli/cron-command", - "version": "v2.2.3", + "version": "v2.3.0", "source": { "type": "git", "url": "https://github.com/wp-cli/cron-command.git", - "reference": "bc7e4bd2f441a5bb3b311e1419be2b05ed53146d" + "reference": "2108295a2f30de77d3ee70b1a60d1b542c2dfd79" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/cron-command/zipball/bc7e4bd2f441a5bb3b311e1419be2b05ed53146d", - "reference": "bc7e4bd2f441a5bb3b311e1419be2b05ed53146d", + "url": "https://api.github.com/repos/wp-cli/cron-command/zipball/2108295a2f30de77d3ee70b1a60d1b542c2dfd79", + "reference": "2108295a2f30de77d3ee70b1a60d1b542c2dfd79", "shasum": "" }, "require": { @@ -5756,22 +5877,22 @@ "homepage": "https://github.com/wp-cli/cron-command", "support": { "issues": "https://github.com/wp-cli/cron-command/issues", - "source": "https://github.com/wp-cli/cron-command/tree/v2.2.3" + "source": "https://github.com/wp-cli/cron-command/tree/v2.3.0" }, - "time": "2023-08-30T13:31:32+00:00" + "time": "2024-02-15T10:23:39+00:00" }, { "name": "wp-cli/db-command", - "version": "v2.0.27", + "version": "v2.1.1", "source": { "type": "git", "url": "https://github.com/wp-cli/db-command.git", - "reference": "eea28dd115fb381c82641a2a3060856d3a67242d" + "reference": "60ee5535e4b39e2d930894b7f435a2e488171c27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/db-command/zipball/eea28dd115fb381c82641a2a3060856d3a67242d", - "reference": "eea28dd115fb381c82641a2a3060856d3a67242d", + "url": "https://api.github.com/repos/wp-cli/db-command/zipball/60ee5535e4b39e2d930894b7f435a2e488171c27", + "reference": "60ee5535e4b39e2d930894b7f435a2e488171c27", "shasum": "" }, "require": { @@ -5830,22 +5951,22 @@ "homepage": "https://github.com/wp-cli/db-command", "support": { "issues": "https://github.com/wp-cli/db-command/issues", - "source": "https://github.com/wp-cli/db-command/tree/v2.0.27" + "source": "https://github.com/wp-cli/db-command/tree/v2.1.1" }, - "time": "2023-11-13T12:34:44+00:00" + "time": "2024-07-10T17:31:56+00:00" }, { "name": "wp-cli/embed-command", - "version": "v2.0.15", + "version": "v2.0.16", "source": { "type": "git", "url": "https://github.com/wp-cli/embed-command.git", - "reference": "3987e2051354eaad842c8612ea9255493534c589" + "reference": "edfa448396484770a419ac7a17b0ec194ae76654" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/embed-command/zipball/3987e2051354eaad842c8612ea9255493534c589", - "reference": "3987e2051354eaad842c8612ea9255493534c589", + "url": "https://api.github.com/repos/wp-cli/embed-command/zipball/edfa448396484770a419ac7a17b0ec194ae76654", + "reference": "edfa448396484770a419ac7a17b0ec194ae76654", "shasum": "" }, "require": { @@ -5897,26 +6018,26 @@ "homepage": "https://github.com/wp-cli/embed-command", "support": { "issues": "https://github.com/wp-cli/embed-command/issues", - "source": "https://github.com/wp-cli/embed-command/tree/v2.0.15" + "source": "https://github.com/wp-cli/embed-command/tree/v2.0.16" }, - "time": "2023-08-30T15:52:06+00:00" + "time": "2024-04-04T11:57:03+00:00" }, { "name": "wp-cli/entity-command", - "version": "v2.6.2", + "version": "v2.8.1", "source": { "type": "git", "url": "https://github.com/wp-cli/entity-command.git", - "reference": "2b5d5d54550edb7383ebaa77fb3a2d53871ba19a" + "reference": "c270cc9a2367cb8f5845f26a6b5e203397c91392" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/entity-command/zipball/2b5d5d54550edb7383ebaa77fb3a2d53871ba19a", - "reference": "2b5d5d54550edb7383ebaa77fb3a2d53871ba19a", + "url": "https://api.github.com/repos/wp-cli/entity-command/zipball/c270cc9a2367cb8f5845f26a6b5e203397c91392", + "reference": "c270cc9a2367cb8f5845f26a6b5e203397c91392", "shasum": "" }, "require": { - "wp-cli/wp-cli": "^2.10" + "wp-cli/wp-cli": "^2.11" }, "require-dev": { "wp-cli/cache-command": "^1 || ^2", @@ -6022,11 +6143,20 @@ "site activate", "site archive", "site create", + "site generate", "site deactivate", "site delete", "site empty", "site list", "site mature", + "site meta", + "site meta add", + "site meta delete", + "site meta get", + "site meta list", + "site meta patch", + "site meta pluck", + "site meta update", "site option", "site private", "site public", @@ -6056,8 +6186,17 @@ "user", "user add-cap", "user add-role", + "user application-password", + "user application-password create", + "user application-password delete", + "user application-password exists", + "user application-password get", + "user application-password list", + "user application-password record-usage", + "user application-password update", "user create", "user delete", + "user exists", "user generate", "user get", "user import-csv", @@ -6078,6 +6217,11 @@ "user session destroy", "user session list", "user set-role", + "user signup", + "user signup activate", + "user signup delete", + "user signup get", + "user signup list", "user spam", "user term", "user term add", @@ -6111,9 +6255,9 @@ "homepage": "https://github.com/wp-cli/entity-command", "support": { "issues": "https://github.com/wp-cli/entity-command/issues", - "source": "https://github.com/wp-cli/entity-command/tree/v2.6.2" + "source": "https://github.com/wp-cli/entity-command/tree/v2.8.1" }, - "time": "2024-02-06T13:38:03+00:00" + "time": "2024-07-29T13:52:21+00:00" }, { "name": "wp-cli/eval-command", @@ -6238,16 +6382,16 @@ }, { "name": "wp-cli/extension-command", - "version": "v2.1.19", + "version": "v2.1.22", "source": { "type": "git", "url": "https://github.com/wp-cli/extension-command.git", - "reference": "80713703e090fbc74926af6f75bf963619f76fdb" + "reference": "7baa058ae33e78a8e19f6a189203ed08e03a21be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/extension-command/zipball/80713703e090fbc74926af6f75bf963619f76fdb", - "reference": "80713703e090fbc74926af6f75bf963619f76fdb", + "url": "https://api.github.com/repos/wp-cli/extension-command/zipball/7baa058ae33e78a8e19f6a189203ed08e03a21be", + "reference": "7baa058ae33e78a8e19f6a189203ed08e03a21be", "shasum": "" }, "require": { @@ -6330,22 +6474,22 @@ "homepage": "https://github.com/wp-cli/extension-command", "support": { "issues": "https://github.com/wp-cli/extension-command/issues", - "source": "https://github.com/wp-cli/extension-command/tree/v2.1.19" + "source": "https://github.com/wp-cli/extension-command/tree/v2.1.22" }, - "time": "2024-02-05T14:53:09+00:00" + "time": "2024-06-04T12:24:31+00:00" }, { "name": "wp-cli/i18n-command", - "version": "2.6.1", + "version": "v2.6.2", "source": { "type": "git", "url": "https://github.com/wp-cli/i18n-command.git", - "reference": "7538d684d4f06b0e10c8a0166ce4e6d9e1687aa1" + "reference": "53518a11f314119e320597c7a8274f11b1295bdc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/i18n-command/zipball/7538d684d4f06b0e10c8a0166ce4e6d9e1687aa1", - "reference": "7538d684d4f06b0e10c8a0166ce4e6d9e1687aa1", + "url": "https://api.github.com/repos/wp-cli/i18n-command/zipball/53518a11f314119e320597c7a8274f11b1295bdc", + "reference": "53518a11f314119e320597c7a8274f11b1295bdc", "shasum": "" }, "require": { @@ -6399,9 +6543,9 @@ "homepage": "https://github.com/wp-cli/i18n-command", "support": { "issues": "https://github.com/wp-cli/i18n-command/issues", - "source": "https://github.com/wp-cli/i18n-command/tree/2.6.1" + "source": "https://github.com/wp-cli/i18n-command/tree/v2.6.2" }, - "time": "2024-02-28T11:27:34+00:00" + "time": "2024-07-03T12:50:00+00:00" }, { "name": "wp-cli/import-command", @@ -6465,16 +6609,16 @@ }, { "name": "wp-cli/language-command", - "version": "v2.0.19", + "version": "v2.0.21", "source": { "type": "git", "url": "https://github.com/wp-cli/language-command.git", - "reference": "4d0a2e58f8c48772e0a85a3b25f413ef240c212a" + "reference": "a9b5ae5976ebb48ee5465cf2f8d9afc863bc4e1c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/language-command/zipball/4d0a2e58f8c48772e0a85a3b25f413ef240c212a", - "reference": "4d0a2e58f8c48772e0a85a3b25f413ef240c212a", + "url": "https://api.github.com/repos/wp-cli/language-command/zipball/a9b5ae5976ebb48ee5465cf2f8d9afc863bc4e1c", + "reference": "a9b5ae5976ebb48ee5465cf2f8d9afc863bc4e1c", "shasum": "" }, "require": { @@ -6538,22 +6682,22 @@ "homepage": "https://github.com/wp-cli/language-command", "support": { "issues": "https://github.com/wp-cli/language-command/issues", - "source": "https://github.com/wp-cli/language-command/tree/v2.0.19" + "source": "https://github.com/wp-cli/language-command/tree/v2.0.21" }, - "time": "2024-02-01T14:28:11+00:00" + "time": "2024-06-21T10:12:40+00:00" }, { "name": "wp-cli/maintenance-mode-command", - "version": "v2.1.0", + "version": "v2.1.1", "source": { "type": "git", "url": "https://github.com/wp-cli/maintenance-mode-command.git", - "reference": "2e9845a1cd1678b960dd8d0dd0c936648113788c" + "reference": "a329a536eb96890654b913b5499b300fcc3f8eab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/maintenance-mode-command/zipball/2e9845a1cd1678b960dd8d0dd0c936648113788c", - "reference": "2e9845a1cd1678b960dd8d0dd0c936648113788c", + "url": "https://api.github.com/repos/wp-cli/maintenance-mode-command/zipball/a329a536eb96890654b913b5499b300fcc3f8eab", + "reference": "a329a536eb96890654b913b5499b300fcc3f8eab", "shasum": "" }, "require": { @@ -6599,22 +6743,22 @@ "homepage": "https://github.com/wp-cli/maintenance-mode-command", "support": { "issues": "https://github.com/wp-cli/maintenance-mode-command/issues", - "source": "https://github.com/wp-cli/maintenance-mode-command/tree/v2.1.0" + "source": "https://github.com/wp-cli/maintenance-mode-command/tree/v2.1.1" }, - "time": "2023-11-06T14:04:13+00:00" + "time": "2024-04-04T11:28:11+00:00" }, { "name": "wp-cli/media-command", - "version": "v2.0.21", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/wp-cli/media-command.git", - "reference": "4950ed4ded35c52068d30fec080d545a33baa85c" + "reference": "8eefc101713713871c1802e387b87348f6a048d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/media-command/zipball/4950ed4ded35c52068d30fec080d545a33baa85c", - "reference": "4950ed4ded35c52068d30fec080d545a33baa85c", + "url": "https://api.github.com/repos/wp-cli/media-command/zipball/8eefc101713713871c1802e387b87348f6a048d5", + "reference": "8eefc101713713871c1802e387b87348f6a048d5", "shasum": "" }, "require": { @@ -6661,9 +6805,9 @@ "homepage": "https://github.com/wp-cli/media-command", "support": { "issues": "https://github.com/wp-cli/media-command/issues", - "source": "https://github.com/wp-cli/media-command/tree/v2.0.21" + "source": "https://github.com/wp-cli/media-command/tree/v2.2.0" }, - "time": "2023-11-10T21:56:52+00:00" + "time": "2024-06-06T09:32:12+00:00" }, { "name": "wp-cli/mustangostang-spyc", @@ -6718,16 +6862,16 @@ }, { "name": "wp-cli/package-command", - "version": "v2.5.0", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/wp-cli/package-command.git", - "reference": "71683195f8c27ad97009628e2a72d2a4155503b2" + "reference": "3370dd88ddf906992bda3a28c8c387c8f4f33073" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/package-command/zipball/71683195f8c27ad97009628e2a72d2a4155503b2", - "reference": "71683195f8c27ad97009628e2a72d2a4155503b2", + "url": "https://api.github.com/repos/wp-cli/package-command/zipball/3370dd88ddf906992bda3a28c8c387c8f4f33073", + "reference": "3370dd88ddf906992bda3a28c8c387c8f4f33073", "shasum": "" }, "require": { @@ -6777,9 +6921,9 @@ "homepage": "https://github.com/wp-cli/package-command", "support": { "issues": "https://github.com/wp-cli/package-command/issues", - "source": "https://github.com/wp-cli/package-command/tree/v2.5.0" + "source": "https://github.com/wp-cli/package-command/tree/v2.5.2" }, - "time": "2023-12-08T10:38:16+00:00" + "time": "2024-05-22T05:26:05+00:00" }, { "name": "wp-cli/php-cli-tools", @@ -6973,16 +7117,16 @@ }, { "name": "wp-cli/scaffold-command", - "version": "v2.2.0", + "version": "v2.3.0", "source": { "type": "git", "url": "https://github.com/wp-cli/scaffold-command.git", - "reference": "8aa906c3ec6ae7d95f38c962fc2561714f9c7145" + "reference": "7a7d145c260ead64fa93a59498d60def970d5214" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/scaffold-command/zipball/8aa906c3ec6ae7d95f38c962fc2561714f9c7145", - "reference": "8aa906c3ec6ae7d95f38c962fc2561714f9c7145", + "url": "https://api.github.com/repos/wp-cli/scaffold-command/zipball/7a7d145c260ead64fa93a59498d60def970d5214", + "reference": "7a7d145c260ead64fa93a59498d60def970d5214", "shasum": "" }, "require": { @@ -7033,22 +7177,22 @@ "homepage": "https://github.com/wp-cli/scaffold-command", "support": { "issues": "https://github.com/wp-cli/scaffold-command/issues", - "source": "https://github.com/wp-cli/scaffold-command/tree/v2.2.0" + "source": "https://github.com/wp-cli/scaffold-command/tree/v2.3.0" }, - "time": "2023-11-16T15:25:33+00:00" + "time": "2024-04-26T21:05:48+00:00" }, { "name": "wp-cli/search-replace-command", - "version": "v2.1.5", + "version": "v2.1.7", "source": { "type": "git", "url": "https://github.com/wp-cli/search-replace-command.git", - "reference": "f6c828abc6d5054d5bbf202b917d2a3b38abed84" + "reference": "89e1653c9b888179a121a8354c75fc5e8ca7931d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/search-replace-command/zipball/f6c828abc6d5054d5bbf202b917d2a3b38abed84", - "reference": "f6c828abc6d5054d5bbf202b917d2a3b38abed84", + "url": "https://api.github.com/repos/wp-cli/search-replace-command/zipball/89e1653c9b888179a121a8354c75fc5e8ca7931d", + "reference": "89e1653c9b888179a121a8354c75fc5e8ca7931d", "shasum": "" }, "require": { @@ -7093,9 +7237,9 @@ "homepage": "https://github.com/wp-cli/search-replace-command", "support": { "issues": "https://github.com/wp-cli/search-replace-command/issues", - "source": "https://github.com/wp-cli/search-replace-command/tree/v2.1.5" + "source": "https://github.com/wp-cli/search-replace-command/tree/v2.1.7" }, - "time": "2024-01-09T00:29:39+00:00" + "time": "2024-06-28T09:30:38+00:00" }, { "name": "wp-cli/server-command", @@ -7214,16 +7358,16 @@ }, { "name": "wp-cli/super-admin-command", - "version": "v2.0.13", + "version": "v2.0.14", "source": { "type": "git", "url": "https://github.com/wp-cli/super-admin-command.git", - "reference": "9d91c131ad814f9bcec313c3877e8348622720d5" + "reference": "0fc8a6146d0450a8b522485e50886e976f5249b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/super-admin-command/zipball/9d91c131ad814f9bcec313c3877e8348622720d5", - "reference": "9d91c131ad814f9bcec313c3877e8348622720d5", + "url": "https://api.github.com/repos/wp-cli/super-admin-command/zipball/0fc8a6146d0450a8b522485e50886e976f5249b6", + "reference": "0fc8a6146d0450a8b522485e50886e976f5249b6", "shasum": "" }, "require": { @@ -7269,22 +7413,22 @@ "homepage": "https://github.com/wp-cli/super-admin-command", "support": { "issues": "https://github.com/wp-cli/super-admin-command/issues", - "source": "https://github.com/wp-cli/super-admin-command/tree/v2.0.13" + "source": "https://github.com/wp-cli/super-admin-command/tree/v2.0.14" }, - "time": "2024-01-08T12:21:39+00:00" + "time": "2024-02-26T12:17:45+00:00" }, { "name": "wp-cli/widget-command", - "version": "v2.1.9", + "version": "v2.1.10", "source": { "type": "git", "url": "https://github.com/wp-cli/widget-command.git", - "reference": "fa67eb62b3b0248014f48fb1280bfdea2eb96712" + "reference": "7062ed3fdfa17265320737f43efe5651d783f439" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/widget-command/zipball/fa67eb62b3b0248014f48fb1280bfdea2eb96712", - "reference": "fa67eb62b3b0248014f48fb1280bfdea2eb96712", + "url": "https://api.github.com/repos/wp-cli/widget-command/zipball/7062ed3fdfa17265320737f43efe5651d783f439", + "reference": "7062ed3fdfa17265320737f43efe5651d783f439", "shasum": "" }, "require": { @@ -7336,22 +7480,22 @@ "homepage": "https://github.com/wp-cli/widget-command", "support": { "issues": "https://github.com/wp-cli/widget-command/issues", - "source": "https://github.com/wp-cli/widget-command/tree/v2.1.9" + "source": "https://github.com/wp-cli/widget-command/tree/v2.1.10" }, - "time": "2023-08-30T15:52:58+00:00" + "time": "2024-04-19T13:21:01+00:00" }, { "name": "wp-cli/wp-cli", - "version": "v2.10.0", + "version": "v2.11.0", "source": { "type": "git", "url": "https://github.com/wp-cli/wp-cli.git", - "reference": "a339dca576df73c31af4b4d8054efc2dab9a0685" + "reference": "53f0df112901fcf95099d0f501912a209429b6a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/wp-cli/zipball/a339dca576df73c31af4b4d8054efc2dab9a0685", - "reference": "a339dca576df73c31af4b4d8054efc2dab9a0685", + "url": "https://api.github.com/repos/wp-cli/wp-cli/zipball/53f0df112901fcf95099d0f501912a209429b6a9", + "reference": "53f0df112901fcf95099d0f501912a209429b6a9", "shasum": "" }, "require": { @@ -7381,7 +7525,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.10.x-dev" + "dev-main": "2.11.x-dev" } }, "autoload": { @@ -7408,20 +7552,20 @@ "issues": "https://github.com/wp-cli/wp-cli/issues", "source": "https://github.com/wp-cli/wp-cli" }, - "time": "2024-02-08T16:52:43+00:00" + "time": "2024-08-08T03:04:55+00:00" }, { "name": "wp-cli/wp-cli-bundle", - "version": "v2.10.0", + "version": "v2.11.0", "source": { "type": "git", "url": "https://github.com/wp-cli/wp-cli-bundle.git", - "reference": "b795ca19f12bf9605dc8d85235d55a721b43064c" + "reference": "f77a284ccf92023981046edf63111ab427106d05" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/wp-cli-bundle/zipball/b795ca19f12bf9605dc8d85235d55a721b43064c", - "reference": "b795ca19f12bf9605dc8d85235d55a721b43064c", + "url": "https://api.github.com/repos/wp-cli/wp-cli-bundle/zipball/f77a284ccf92023981046edf63111ab427106d05", + "reference": "f77a284ccf92023981046edf63111ab427106d05", "shasum": "" }, "require": { @@ -7451,7 +7595,7 @@ "wp-cli/shell-command": "^2", "wp-cli/super-admin-command": "^2", "wp-cli/widget-command": "^2", - "wp-cli/wp-cli": "^2.10.0" + "wp-cli/wp-cli": "^2.11.0" }, "require-dev": { "roave/security-advisories": "dev-latest", @@ -7463,7 +7607,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.9.x-dev" + "dev-main": "2.11.x-dev" } }, "notification-url": "https://packagist.org/downloads/", @@ -7481,20 +7625,20 @@ "issues": "https://github.com/wp-cli/wp-cli-bundle/issues", "source": "https://github.com/wp-cli/wp-cli-bundle" }, - "time": "2024-02-08T17:05:33+00:00" + "time": "2024-08-08T03:29:34+00:00" }, { "name": "wp-cli/wp-config-transformer", - "version": "v1.3.5", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/wp-cli/wp-config-transformer.git", - "reference": "202aa80528939159d52bc4026cee5453aec382db" + "reference": "9b470f6f1a75707b22e9cfb85bb74120256243b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/wp-config-transformer/zipball/202aa80528939159d52bc4026cee5453aec382db", - "reference": "202aa80528939159d52bc4026cee5453aec382db", + "url": "https://api.github.com/repos/wp-cli/wp-config-transformer/zipball/9b470f6f1a75707b22e9cfb85bb74120256243b4", + "reference": "9b470f6f1a75707b22e9cfb85bb74120256243b4", "shasum": "" }, "require": { @@ -7523,9 +7667,9 @@ "homepage": "https://github.com/wp-cli/wp-config-transformer", "support": { "issues": "https://github.com/wp-cli/wp-config-transformer/issues", - "source": "https://github.com/wp-cli/wp-config-transformer/tree/v1.3.5" + "source": "https://github.com/wp-cli/wp-config-transformer/tree/v1.4.0" }, - "time": "2023-11-10T14:28:03+00:00" + "time": "2024-09-17T19:05:47+00:00" }, { "name": "wp-coding-standards/wpcs", @@ -7580,16 +7724,16 @@ }, { "name": "yoast/phpunit-polyfills", - "version": "1.1.0", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/Yoast/PHPUnit-Polyfills.git", - "reference": "224e4a1329c03d8bad520e3fc4ec980034a4b212" + "reference": "e9c8413de4c8ae03d2923a44f17d0d7dad1b96be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Yoast/PHPUnit-Polyfills/zipball/224e4a1329c03d8bad520e3fc4ec980034a4b212", - "reference": "224e4a1329c03d8bad520e3fc4ec980034a4b212", + "url": "https://api.github.com/repos/Yoast/PHPUnit-Polyfills/zipball/e9c8413de4c8ae03d2923a44f17d0d7dad1b96be", + "reference": "e9c8413de4c8ae03d2923a44f17d0d7dad1b96be", "shasum": "" }, "require": { @@ -7597,12 +7741,14 @@ "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0" }, "require-dev": { - "yoast/yoastcs": "^2.3.0" + "php-parallel-lint/php-console-highlighter": "^1.0.0", + "php-parallel-lint/php-parallel-lint": "^1.4.0", + "yoast/yoastcs": "^3.1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.x-dev" + "dev-main": "3.x-dev" } }, "autoload": { @@ -7634,9 +7780,10 @@ ], "support": { "issues": "https://github.com/Yoast/PHPUnit-Polyfills/issues", + "security": "https://github.com/Yoast/PHPUnit-Polyfills/security/policy", "source": "https://github.com/Yoast/PHPUnit-Polyfills" }, - "time": "2023-08-19T14:25:08+00:00" + "time": "2024-09-06T22:03:10+00:00" } ], "aliases": [], @@ -7651,5 +7798,5 @@ "platform-overrides": { "php": "7.3" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.3.0" } From 754aaf1e97030323efc71b70cafae0fb2b610802 Mon Sep 17 00:00:00 2001 From: Laura Date: Thu, 17 Oct 2024 10:42:31 +0100 Subject: [PATCH 24/31] phpcs fixes --- ...lass-wc-amazon-payments-advanced-admin.php | 4 +- ...c-amazon-payments-advanced-order-admin.php | 8 +-- ...c-amazon-payments-advanced-ipn-handler.php | 7 +- ...eway-amazon-payments-advanced-abstract.php | 4 +- ...amazon-payments-advanced-subscriptions.php | 19 ++++-- ...ss-wc-gateway-amazon-payments-advanced.php | 67 +++++++++++-------- ...ments-advanced-multi-currency-abstract.php | 2 +- ...-payments-advanced-multi-currency-ppbc.php | 20 ++++-- ...mazon-payments-advanced-multi-currency.php | 5 +- 9 files changed, 81 insertions(+), 55 deletions(-) diff --git a/includes/admin/class-wc-amazon-payments-advanced-admin.php b/includes/admin/class-wc-amazon-payments-advanced-admin.php index 77a658a9..777f6f99 100644 --- a/includes/admin/class-wc-amazon-payments-advanced-admin.php +++ b/includes/admin/class-wc-amazon-payments-advanced-admin.php @@ -180,7 +180,7 @@ protected function get_admin_notices() { ); } - if ( ! WC_Amazon_Payments_Advanced_API::get_amazon_keys_set() && 'yes' === $this->settings['enabled'] && $current_section !== 'amazon_payments_advanced' ) { + if ( ! WC_Amazon_Payments_Advanced_API::get_amazon_keys_set() && 'yes' === $this->settings['enabled'] && 'amazon_payments_advanced' !== $current_section ) { $notices[] = array( 'dismiss_action' => 'amazon_pay_dismiss_enable_notice', 'class' => 'amazon-pay-enable-notice', @@ -311,7 +311,7 @@ public function admin_notices() {