diff --git a/changelog.txt b/changelog.txt index 1b680e746..3ca38e0e2 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,6 @@ *** Changelog *** -= 2.7.1 - xxxx-xx-xx = += 2.7.1 - 2024-05-28 = * Fix - Ensure package tracking data is sent to original PayPal transaction #2180 * Fix - Set the 'Woo_PPCP' as a default value for data-partner-attribution-id #2188 * Fix - Allow PUI Gateway for refund processor #2192 @@ -9,6 +9,7 @@ * Fix - Allow shipping callback and skipping confirmation page from any express button #2236 * Fix - Pay Later messaging configurator sometimes displays old settings after saving #2249 * Fix - Update the apple-developer-merchantid-domain-association validation strings for Apple Pay #2251 +* Fix - Enable the Shipping Callback handlers #2266 * Enhancement - Use admin theme color #1602 = 2.7.0 - 2024-04-30 = diff --git a/modules/ppcp-applepay/services.php b/modules/ppcp-applepay/services.php index 003c8226c..6079fcb40 100644 --- a/modules/ppcp-applepay/services.php +++ b/modules/ppcp-applepay/services.php @@ -964,7 +964,7 @@ return array( : $container->get( 'applepay.enable-url-sandbox' ); $button_url = $enabled - ? admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=ppcp-gateway#field-alternative_payment_methods' ) + ? admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=ppcp-gateway&ppcp-tab=ppcp-credit-card-gateway#ppcp-applepay_button_enabled' ) : $enable_url; return sprintf( diff --git a/modules/ppcp-button/resources/js/modules/Renderer/Renderer.js b/modules/ppcp-button/resources/js/modules/Renderer/Renderer.js index d7de31ec8..895a7845b 100644 --- a/modules/ppcp-button/resources/js/modules/Renderer/Renderer.js +++ b/modules/ppcp-button/resources/js/modules/Renderer/Renderer.js @@ -102,10 +102,10 @@ class Renderer { }, }; - // Check the condition and add the onShippingOptionsChange handler if needed + // Check the condition and add the handler if needed if (this.shouldHandleShippingInPaypal(venmoButtonClicked)) { - options.onShippingOptionsChange = (data, actions) => null; - options.onShippingAddressChange = (data, actions) => null; + options.onShippingOptionsChange = (data, actions) => handleShippingOptionsChange(data, actions, this.defaultSettings); + options.onShippingAddressChange = (data, actions) => handleShippingAddressChange(data, actions, this.defaultSettings); } return options; diff --git a/modules/ppcp-googlepay/services.php b/modules/ppcp-googlepay/services.php index f7e195821..6f41db792 100644 --- a/modules/ppcp-googlepay/services.php +++ b/modules/ppcp-googlepay/services.php @@ -926,7 +926,7 @@ return array( : $container->get( 'googlepay.enable-url-sandbox' ); $button_url = $enabled - ? admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=ppcp-gateway#field-alternative_payment_methods' ) + ? admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=ppcp-gateway&ppcp-tab=ppcp-credit-card-gateway#ppcp-googlepay_button_enabled' ) : $enable_url; return sprintf( diff --git a/modules/ppcp-paylater-configurator/services.php b/modules/ppcp-paylater-configurator/services.php index de282b4c1..8be798d24 100644 --- a/modules/ppcp-paylater-configurator/services.php +++ b/modules/ppcp-paylater-configurator/services.php @@ -17,12 +17,14 @@ use WooCommerce\PayPalCommerce\Vendor\Psr\Container\ContainerInterface; return array( 'paylater-configurator.url' => static function ( ContainerInterface $container ): string { /** + * The return value must not contain a trailing slash. + * * Cannot return false for this path. * * @psalm-suppress PossiblyFalseArgument */ return plugins_url( - '/modules/ppcp-paylater-configurator/', + '/modules/ppcp-paylater-configurator', dirname( realpath( __FILE__ ), 3 ) . '/woocommerce-paypal-payments.php' ); }, diff --git a/modules/ppcp-wc-gateway/src/Processor/OrderProcessor.php b/modules/ppcp-wc-gateway/src/Processor/OrderProcessor.php index d2b145b0b..4d1363361 100644 --- a/modules/ppcp-wc-gateway/src/Processor/OrderProcessor.php +++ b/modules/ppcp-wc-gateway/src/Processor/OrderProcessor.php @@ -220,9 +220,14 @@ class OrderProcessor { ); throw new PayPalOrderMissingException( - __( - 'Could not retrieve order. Maybe it was already completed or this browser is not supported. Please check your email or try again with a different browser.', - 'woocommerce-paypal-payments' + sprintf( + // translators: %s: Order history URL on My Account section. + esc_attr__( + 'There was an error processing your order. Please check for any charges in your payment method and review your order history before placing the order again.', + // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch -- Intentionally "woocommerce" to reflect the original message. + 'woocommerce' + ), + esc_url( wc_get_account_endpoint_url( 'orders' ) ) ) ); } diff --git a/readme.txt b/readme.txt index ff494fa80..0c6bdbb1a 100644 --- a/readme.txt +++ b/readme.txt @@ -179,7 +179,7 @@ If you encounter issues with the PayPal buttons not appearing after an update, p == Changelog == -= 2.7.1 - xxxx-xx-xx = += 2.7.1 - 2024-05-28 = * Fix - Ensure package tracking data is sent to original PayPal transaction #2180 * Fix - Set the 'Woo_PPCP' as a default value for data-partner-attribution-id #2188 * Fix - Allow PUI Gateway for refund processor #2192 @@ -188,6 +188,7 @@ If you encounter issues with the PayPal buttons not appearing after an update, p * Fix - Allow shipping callback and skipping confirmation page from any express button #2236 * Fix - Pay Later messaging configurator sometimes displays old settings after saving #2249 * Fix - Update the apple-developer-merchantid-domain-association validation strings for Apple Pay #2251 +* Fix - Enable the Shipping Callback handlers #2266 * Enhancement - Use admin theme color #1602 = 2.7.0 - 2024-04-30 =