diff --git a/composer.lock b/composer.lock index 24614ed09..41dfebf07 100644 --- a/composer.lock +++ b/composer.lock @@ -282,29 +282,29 @@ }, { "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v1.1.2", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/composer-installer.git", - "reference": "e9cf5e4bbf7eeaf9ef5db34938942602838fc2b1" + "reference": "845eb62303d2ca9b289ef216356568ccc075ffd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/e9cf5e4bbf7eeaf9ef5db34938942602838fc2b1", - "reference": "e9cf5e4bbf7eeaf9ef5db34938942602838fc2b1", + "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/845eb62303d2ca9b289ef216356568ccc075ffd1", + "reference": "845eb62303d2ca9b289ef216356568ccc075ffd1", "shasum": "" }, "require": { "composer-plugin-api": "^2.2", "php": ">=5.4", - "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" + "squizlabs/php_codesniffer": "^3.1.0 || ^4.0" }, "require-dev": { "composer/composer": "^2.2", "ext-json": "*", "ext-zip": "*", "php-parallel-lint/php-parallel-lint": "^1.4.0", - "phpcompatibility/php-compatibility": "^9.0", + "phpcompatibility/php-compatibility": "^9.0 || ^10.0.0@dev", "yoast/phpunit-polyfills": "^1.0" }, "type": "composer-plugin", @@ -374,7 +374,7 @@ "type": "thanks_dev" } ], - "time": "2025-07-17T20:45:56+00:00" + "time": "2025-11-11T04:32:07+00:00" }, { "name": "doctrine/instantiator", @@ -2552,16 +2552,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.13.4", + "version": "3.13.5", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "ad545ea9c1b7d270ce0fc9cbfb884161cd706119" + "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/ad545ea9c1b7d270ce0fc9cbfb884161cd706119", - "reference": "ad545ea9c1b7d270ce0fc9cbfb884161cd706119", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0ca86845ce43291e8f5692c7356fccf3bcf02bf4", + "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4", "shasum": "" }, "require": { @@ -2578,11 +2578,6 @@ "bin/phpcs" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" @@ -2632,7 +2627,7 @@ "type": "thanks_dev" } ], - "time": "2025-09-05T05:47:09+00:00" + "time": "2025-11-04T16:30:35+00:00" }, { "name": "symfony/console", diff --git a/includes/class-modal-checkout.php b/includes/class-modal-checkout.php index 7b718b496..6d62b13bf 100644 --- a/includes/class-modal-checkout.php +++ b/includes/class-modal-checkout.php @@ -759,6 +759,7 @@ public static function enqueue_scripts() { 'billing_details' => self::get_modal_checkout_labels( 'billing_details' ), 'shipping_details' => self::get_modal_checkout_labels( 'shipping_details' ), 'gift_recipient' => self::get_modal_checkout_labels( 'gift_recipient' ), + 'critical_error' => self::get_modal_checkout_labels( 'checkout_critical_error' ), 'complete_button' => self::order_button_text_with_price(), ], ] @@ -970,6 +971,7 @@ public static function enqueue_modal( $product_id = null ) { 'register_modal_title' => self::get_modal_checkout_labels( 'register_modal_title' ), 'signin_modal_title' => self::get_modal_checkout_labels( 'signin_modal_title' ), 'thankyou_modal_title' => self::get_modal_checkout_labels( 'checkout_success' ), + 'critical_error' => self::get_modal_checkout_labels( 'checkout_critical_error' ), ], 'processing_payment_messages' => [ @@ -977,6 +979,10 @@ public static function enqueue_modal( $product_id = null ) { 'text' => __( 'Processing payment...', 'newspack-blocks' ), 'delay' => 0, ], + [ + 'text' => __( 'Processing payment...', 'newspack-blocks' ), + 'delay' => 250, + ], [ 'text' => __( 'Verifying details...', 'newspack-blocks' ), 'delay' => 8000, @@ -1551,7 +1557,7 @@ public static function woocommerce_cart_product_cannot_be_purchased_message( $me */ public static function hide_expiry_message_shop_link( $message ) { if ( self::is_modal_checkout() && strpos( $message, 'Sorry, your session has expired' ) !== false ) { - return __( 'Could not complete this transaction. Please contact us for assistance.', 'newspack-blocks' ); + return self::get_modal_checkout_labels( 'checkout_critical_error' ); } return $message; } @@ -2029,6 +2035,7 @@ public static function get_modal_checkout_labels( $key = null ) { 'checkout_nyp_thankyou' => __( "Thank you for your generosity! We couldn't do this without you!", 'newspack-blocks' ), 'checkout_nyp_title' => __( 'Increase your support', 'newspack-blocks' ), 'checkout_nyp_apply' => __( 'Apply', 'newspack-blocks' ), + 'checkout_critical_error' => __( 'We ran into a problem processing this request. Please try again.', 'newspack-blocks' ), ]; /** diff --git a/languages/newspack-blocks-de_DE.po b/languages/newspack-blocks-de_DE.po index 816522916..75fda48d8 100644 --- a/languages/newspack-blocks-de_DE.po +++ b/languages/newspack-blocks-de_DE.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Newspack Blocks\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/project\n" -"POT-Creation-Date: 2025-11-13T18:38:30+00:00\n" +"POT-Creation-Date: 2025-11-24T20:10:24+00:00\n" "PO-Revision-Date: 2024-08-30 08:45-0700\n" "Last-Translator: \n" "Language-Team: \n" @@ -77,169 +77,169 @@ msgstr "" msgid "Or" msgstr "" -#: includes/class-modal-checkout.php:977 +#: includes/class-modal-checkout.php:979 includes/class-modal-checkout.php:983 msgid "Processing payment..." msgstr "" -#: includes/class-modal-checkout.php:981 +#: includes/class-modal-checkout.php:987 msgid "Verifying details..." msgstr "" -#: includes/class-modal-checkout.php:985 +#: includes/class-modal-checkout.php:991 msgid "Finalizing transaction..." msgstr "" -#: includes/class-modal-checkout.php:1041 +#: includes/class-modal-checkout.php:1047 msgid "" "We're sorry, there was an unexpected error. Please try again in a few " "minutes." msgstr "" -#: includes/class-modal-checkout.php:1053 +#: includes/class-modal-checkout.php:1059 msgid "Go back" msgstr "" -#: includes/class-modal-checkout.php:1143 +#: includes/class-modal-checkout.php:1149 msgid "Password mismatch" msgstr "" -#: includes/class-modal-checkout.php:1144 +#: includes/class-modal-checkout.php:1150 msgid "Password strength: Very weak" msgstr "" -#: includes/class-modal-checkout.php:1145 +#: includes/class-modal-checkout.php:1151 msgid "Password strength: Weak" msgstr "" -#: includes/class-modal-checkout.php:1146 +#: includes/class-modal-checkout.php:1152 msgid "Password strength: Medium" msgstr "" -#: includes/class-modal-checkout.php:1147 +#: includes/class-modal-checkout.php:1153 msgid "Password strength: Strong" msgstr "" -#: includes/class-modal-checkout.php:1328 +#: includes/class-modal-checkout.php:1334 msgid "Please enter someone else' email address to receive this gift." msgstr "" -#: includes/class-modal-checkout.php:1329 +#: includes/class-modal-checkout.php:1335 msgid "Please enter a valid email address to receive this gift." msgstr "" -#: includes/class-modal-checkout.php:1418 +#: includes/class-modal-checkout.php:1424 msgid "Close window" msgstr "" #. translators: %s: Site name. -#: includes/class-modal-checkout.php:1505 +#: includes/class-modal-checkout.php:1511 #, php-format msgid "" "You're already a subscriber! You can only have one active subscription at a " "time. Thank you for supporting %s." msgstr "" -#: includes/class-modal-checkout.php:1516 +#: includes/class-modal-checkout.php:1522 msgid "" "You're already a subscriber! You can only have one subscription at a time. " "If you wish to renew an expired subscription, please sign in and visit the " "subscriptions page on your account." msgstr "" -#: includes/class-modal-checkout.php:1554 -msgid "Could not complete this transaction. Please contact us for assistance." -msgstr "" - #. translators: 1: Checkout button confirmation text. 2: Order total. #. translators: 1 is the name of the item. 2 is the price of the item. -#: includes/class-modal-checkout.php:1640 -#: includes/modal-checkout/class-checkout-data.php:67 +#: includes/class-modal-checkout.php:1646 +#: includes/modal-checkout/class-checkout-data.php:68 #, php-format msgid "%1$s: %2$s" msgstr "" -#: includes/class-modal-checkout.php:1999 +#: includes/class-modal-checkout.php:2005 msgid "Billing details" msgstr "" -#: includes/class-modal-checkout.php:2000 +#: includes/class-modal-checkout.php:2006 msgid "Shipping details" msgstr "" -#: includes/class-modal-checkout.php:2001 +#: includes/class-modal-checkout.php:2007 msgid "Gift recipient" msgstr "" -#: includes/class-modal-checkout.php:2002 -#: includes/class-modal-checkout.php:2003 -#: includes/class-modal-checkout.php:2004 +#: includes/class-modal-checkout.php:2008 +#: includes/class-modal-checkout.php:2009 +#: includes/class-modal-checkout.php:2010 msgid "Complete your transaction" msgstr "" -#: includes/class-modal-checkout.php:2005 +#: includes/class-modal-checkout.php:2011 msgctxt "Login modal title when logged out user attempts to checkout." msgid "Sign in to complete transaction" msgstr "" -#: includes/class-modal-checkout.php:2010 +#: includes/class-modal-checkout.php:2016 msgctxt "Login modal title when unregistered user attempts to checkout" msgid "Register to complete transaction" msgstr "" -#: includes/class-modal-checkout.php:2015 +#: includes/class-modal-checkout.php:2021 msgid "Continue browsing" msgstr "" -#: includes/class-modal-checkout.php:2016 +#: includes/class-modal-checkout.php:2022 msgid "This donation is a gift" msgstr "" -#: includes/class-modal-checkout.php:2021 +#: includes/class-modal-checkout.php:2027 msgid "This purchase is a gift" msgstr "" -#: includes/class-modal-checkout.php:2023 +#: includes/class-modal-checkout.php:2029 msgid "Complete transaction" msgstr "" -#: includes/class-modal-checkout.php:2024 +#: includes/class-modal-checkout.php:2030 msgid "Purchase" msgstr "" -#: includes/class-modal-checkout.php:2025 +#: includes/class-modal-checkout.php:2031 msgid "Edit billing information" msgstr "" -#: includes/class-modal-checkout.php:2026 dist/editor.js:29 +#: includes/class-modal-checkout.php:2032 dist/editor.js:29 #: src/blocks/checkout-button/edit.js:192 msgid "Cancel" msgstr "" -#: includes/class-modal-checkout.php:2027 +#: includes/class-modal-checkout.php:2033 msgid "Transaction successful" msgstr "" -#: includes/class-modal-checkout.php:2028 +#: includes/class-modal-checkout.php:2034 msgid "" "Your contribution directly funds our work. If you're moved to do so, you can " "opt to pay more than the standard rate." msgstr "" -#: includes/class-modal-checkout.php:2029 +#: includes/class-modal-checkout.php:2035 msgid "Thank you for your generosity! We couldn't do this without you!" msgstr "" -#: includes/class-modal-checkout.php:2030 +#: includes/class-modal-checkout.php:2036 msgid "Increase your support" msgstr "" -#: includes/class-modal-checkout.php:2031 +#: includes/class-modal-checkout.php:2037 #: src/modal-checkout/templates/form-coupon.php:20 msgid "Apply" msgstr "" +#: includes/class-modal-checkout.php:2038 +msgid "We ran into a problem processing this request. Please try again." +msgstr "" + #. Translators: %s is the site name. -#: includes/class-modal-checkout.php:2168 +#: includes/class-modal-checkout.php:2175 #, php-format msgid "" "Thank you for supporting %s. Your transaction was completed successfully." @@ -318,7 +318,7 @@ msgstr "" msgid " per " msgstr "" -#: includes/modal-checkout/class-checkout-data.php:301 dist/editor.js:35 +#: includes/modal-checkout/class-checkout-data.php:310 dist/editor.js:35 #: src/blocks/donate/index.js:31 msgid "Donate" msgstr "Spenden" diff --git a/languages/newspack-blocks-es_ES.po b/languages/newspack-blocks-es_ES.po index e87702a77..ba8a79e15 100644 --- a/languages/newspack-blocks-es_ES.po +++ b/languages/newspack-blocks-es_ES.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Newspack Blocks 1.0.0-alpha.20\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/project\n" -"POT-Creation-Date: 2025-11-13T18:38:30+00:00\n" +"POT-Creation-Date: 2025-11-24T20:10:24+00:00\n" "PO-Revision-Date: 2025-08-12T14:56:45+00:00\n" "Last-Translator: \n" "Language-Team: \n" @@ -69,169 +69,169 @@ msgstr "" msgid "Or" msgstr "" -#: includes/class-modal-checkout.php:977 +#: includes/class-modal-checkout.php:979 includes/class-modal-checkout.php:983 msgid "Processing payment..." msgstr "" -#: includes/class-modal-checkout.php:981 +#: includes/class-modal-checkout.php:987 msgid "Verifying details..." msgstr "" -#: includes/class-modal-checkout.php:985 +#: includes/class-modal-checkout.php:991 msgid "Finalizing transaction..." msgstr "" -#: includes/class-modal-checkout.php:1041 +#: includes/class-modal-checkout.php:1047 msgid "" "We're sorry, there was an unexpected error. Please try again in a few " "minutes." msgstr "" -#: includes/class-modal-checkout.php:1053 +#: includes/class-modal-checkout.php:1059 msgid "Go back" msgstr "" -#: includes/class-modal-checkout.php:1143 +#: includes/class-modal-checkout.php:1149 msgid "Password mismatch" msgstr "" -#: includes/class-modal-checkout.php:1144 +#: includes/class-modal-checkout.php:1150 msgid "Password strength: Very weak" msgstr "" -#: includes/class-modal-checkout.php:1145 +#: includes/class-modal-checkout.php:1151 msgid "Password strength: Weak" msgstr "" -#: includes/class-modal-checkout.php:1146 +#: includes/class-modal-checkout.php:1152 msgid "Password strength: Medium" msgstr "" -#: includes/class-modal-checkout.php:1147 +#: includes/class-modal-checkout.php:1153 msgid "Password strength: Strong" msgstr "" -#: includes/class-modal-checkout.php:1328 +#: includes/class-modal-checkout.php:1334 msgid "Please enter someone else' email address to receive this gift." msgstr "" -#: includes/class-modal-checkout.php:1329 +#: includes/class-modal-checkout.php:1335 msgid "Please enter a valid email address to receive this gift." msgstr "" -#: includes/class-modal-checkout.php:1418 +#: includes/class-modal-checkout.php:1424 msgid "Close window" msgstr "" #. translators: %s: Site name. -#: includes/class-modal-checkout.php:1505 +#: includes/class-modal-checkout.php:1511 #, php-format msgid "" "You're already a subscriber! You can only have one active subscription at a " "time. Thank you for supporting %s." msgstr "" -#: includes/class-modal-checkout.php:1516 +#: includes/class-modal-checkout.php:1522 msgid "" "You're already a subscriber! You can only have one subscription at a time. " "If you wish to renew an expired subscription, please sign in and visit the " "subscriptions page on your account." msgstr "" -#: includes/class-modal-checkout.php:1554 -msgid "Could not complete this transaction. Please contact us for assistance." -msgstr "" - #. translators: 1: Checkout button confirmation text. 2: Order total. #. translators: 1 is the name of the item. 2 is the price of the item. -#: includes/class-modal-checkout.php:1640 -#: includes/modal-checkout/class-checkout-data.php:67 +#: includes/class-modal-checkout.php:1646 +#: includes/modal-checkout/class-checkout-data.php:68 #, php-format msgid "%1$s: %2$s" msgstr "" -#: includes/class-modal-checkout.php:1999 +#: includes/class-modal-checkout.php:2005 msgid "Billing details" msgstr "" -#: includes/class-modal-checkout.php:2000 +#: includes/class-modal-checkout.php:2006 msgid "Shipping details" msgstr "" -#: includes/class-modal-checkout.php:2001 +#: includes/class-modal-checkout.php:2007 msgid "Gift recipient" msgstr "" -#: includes/class-modal-checkout.php:2002 -#: includes/class-modal-checkout.php:2003 -#: includes/class-modal-checkout.php:2004 +#: includes/class-modal-checkout.php:2008 +#: includes/class-modal-checkout.php:2009 +#: includes/class-modal-checkout.php:2010 msgid "Complete your transaction" msgstr "" -#: includes/class-modal-checkout.php:2005 +#: includes/class-modal-checkout.php:2011 msgctxt "Login modal title when logged out user attempts to checkout." msgid "Sign in to complete transaction" msgstr "" -#: includes/class-modal-checkout.php:2010 +#: includes/class-modal-checkout.php:2016 msgctxt "Login modal title when unregistered user attempts to checkout" msgid "Register to complete transaction" msgstr "" -#: includes/class-modal-checkout.php:2015 +#: includes/class-modal-checkout.php:2021 msgid "Continue browsing" msgstr "" -#: includes/class-modal-checkout.php:2016 +#: includes/class-modal-checkout.php:2022 msgid "This donation is a gift" msgstr "" -#: includes/class-modal-checkout.php:2021 +#: includes/class-modal-checkout.php:2027 msgid "This purchase is a gift" msgstr "" -#: includes/class-modal-checkout.php:2023 +#: includes/class-modal-checkout.php:2029 msgid "Complete transaction" msgstr "" -#: includes/class-modal-checkout.php:2024 +#: includes/class-modal-checkout.php:2030 msgid "Purchase" msgstr "" -#: includes/class-modal-checkout.php:2025 +#: includes/class-modal-checkout.php:2031 msgid "Edit billing information" msgstr "" -#: includes/class-modal-checkout.php:2026 dist/editor.js:29 +#: includes/class-modal-checkout.php:2032 dist/editor.js:29 #: src/blocks/checkout-button/edit.js:192 msgid "Cancel" msgstr "" -#: includes/class-modal-checkout.php:2027 +#: includes/class-modal-checkout.php:2033 msgid "Transaction successful" msgstr "" -#: includes/class-modal-checkout.php:2028 +#: includes/class-modal-checkout.php:2034 msgid "" "Your contribution directly funds our work. If you're moved to do so, you can " "opt to pay more than the standard rate." msgstr "" -#: includes/class-modal-checkout.php:2029 +#: includes/class-modal-checkout.php:2035 msgid "Thank you for your generosity! We couldn't do this without you!" msgstr "" -#: includes/class-modal-checkout.php:2030 +#: includes/class-modal-checkout.php:2036 msgid "Increase your support" msgstr "" -#: includes/class-modal-checkout.php:2031 +#: includes/class-modal-checkout.php:2037 #: src/modal-checkout/templates/form-coupon.php:20 msgid "Apply" msgstr "" +#: includes/class-modal-checkout.php:2038 +msgid "We ran into a problem processing this request. Please try again." +msgstr "" + #. Translators: %s is the site name. -#: includes/class-modal-checkout.php:2168 +#: includes/class-modal-checkout.php:2175 #, php-format msgid "" "Thank you for supporting %s. Your transaction was completed successfully." @@ -310,7 +310,7 @@ msgstr "" msgid " per " msgstr "" -#: includes/modal-checkout/class-checkout-data.php:301 dist/editor.js:35 +#: includes/modal-checkout/class-checkout-data.php:310 dist/editor.js:35 #: src/blocks/donate/index.js:31 msgid "Donate" msgstr "" diff --git a/languages/newspack-blocks-fr_BE.po b/languages/newspack-blocks-fr_BE.po index e1a3856a1..0ed081853 100644 --- a/languages/newspack-blocks-fr_BE.po +++ b/languages/newspack-blocks-fr_BE.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Newspack Blocks 1.0.0-alpha.25\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/project\n" -"POT-Creation-Date: 2025-11-13T18:38:30+00:00\n" +"POT-Creation-Date: 2025-11-24T20:10:24+00:00\n" "PO-Revision-Date: 2024-08-30 08:46-0700\n" "Last-Translator: \n" "Language-Team: \n" @@ -67,169 +67,169 @@ msgstr "" msgid "Or" msgstr "" -#: includes/class-modal-checkout.php:977 +#: includes/class-modal-checkout.php:979 includes/class-modal-checkout.php:983 msgid "Processing payment..." msgstr "" -#: includes/class-modal-checkout.php:981 +#: includes/class-modal-checkout.php:987 msgid "Verifying details..." msgstr "" -#: includes/class-modal-checkout.php:985 +#: includes/class-modal-checkout.php:991 msgid "Finalizing transaction..." msgstr "" -#: includes/class-modal-checkout.php:1041 +#: includes/class-modal-checkout.php:1047 msgid "" "We're sorry, there was an unexpected error. Please try again in a few " "minutes." msgstr "" -#: includes/class-modal-checkout.php:1053 +#: includes/class-modal-checkout.php:1059 msgid "Go back" msgstr "" -#: includes/class-modal-checkout.php:1143 +#: includes/class-modal-checkout.php:1149 msgid "Password mismatch" msgstr "" -#: includes/class-modal-checkout.php:1144 +#: includes/class-modal-checkout.php:1150 msgid "Password strength: Very weak" msgstr "" -#: includes/class-modal-checkout.php:1145 +#: includes/class-modal-checkout.php:1151 msgid "Password strength: Weak" msgstr "" -#: includes/class-modal-checkout.php:1146 +#: includes/class-modal-checkout.php:1152 msgid "Password strength: Medium" msgstr "" -#: includes/class-modal-checkout.php:1147 +#: includes/class-modal-checkout.php:1153 msgid "Password strength: Strong" msgstr "" -#: includes/class-modal-checkout.php:1328 +#: includes/class-modal-checkout.php:1334 msgid "Please enter someone else' email address to receive this gift." msgstr "" -#: includes/class-modal-checkout.php:1329 +#: includes/class-modal-checkout.php:1335 msgid "Please enter a valid email address to receive this gift." msgstr "" -#: includes/class-modal-checkout.php:1418 +#: includes/class-modal-checkout.php:1424 msgid "Close window" msgstr "" #. translators: %s: Site name. -#: includes/class-modal-checkout.php:1505 +#: includes/class-modal-checkout.php:1511 #, php-format msgid "" "You're already a subscriber! You can only have one active subscription at a " "time. Thank you for supporting %s." msgstr "" -#: includes/class-modal-checkout.php:1516 +#: includes/class-modal-checkout.php:1522 msgid "" "You're already a subscriber! You can only have one subscription at a time. " "If you wish to renew an expired subscription, please sign in and visit the " "subscriptions page on your account." msgstr "" -#: includes/class-modal-checkout.php:1554 -msgid "Could not complete this transaction. Please contact us for assistance." -msgstr "" - #. translators: 1: Checkout button confirmation text. 2: Order total. #. translators: 1 is the name of the item. 2 is the price of the item. -#: includes/class-modal-checkout.php:1640 -#: includes/modal-checkout/class-checkout-data.php:67 +#: includes/class-modal-checkout.php:1646 +#: includes/modal-checkout/class-checkout-data.php:68 #, php-format msgid "%1$s: %2$s" msgstr "" -#: includes/class-modal-checkout.php:1999 +#: includes/class-modal-checkout.php:2005 msgid "Billing details" msgstr "" -#: includes/class-modal-checkout.php:2000 +#: includes/class-modal-checkout.php:2006 msgid "Shipping details" msgstr "" -#: includes/class-modal-checkout.php:2001 +#: includes/class-modal-checkout.php:2007 msgid "Gift recipient" msgstr "" -#: includes/class-modal-checkout.php:2002 -#: includes/class-modal-checkout.php:2003 -#: includes/class-modal-checkout.php:2004 +#: includes/class-modal-checkout.php:2008 +#: includes/class-modal-checkout.php:2009 +#: includes/class-modal-checkout.php:2010 msgid "Complete your transaction" msgstr "" -#: includes/class-modal-checkout.php:2005 +#: includes/class-modal-checkout.php:2011 msgctxt "Login modal title when logged out user attempts to checkout." msgid "Sign in to complete transaction" msgstr "" -#: includes/class-modal-checkout.php:2010 +#: includes/class-modal-checkout.php:2016 msgctxt "Login modal title when unregistered user attempts to checkout" msgid "Register to complete transaction" msgstr "" -#: includes/class-modal-checkout.php:2015 +#: includes/class-modal-checkout.php:2021 msgid "Continue browsing" msgstr "" -#: includes/class-modal-checkout.php:2016 +#: includes/class-modal-checkout.php:2022 msgid "This donation is a gift" msgstr "" -#: includes/class-modal-checkout.php:2021 +#: includes/class-modal-checkout.php:2027 msgid "This purchase is a gift" msgstr "" -#: includes/class-modal-checkout.php:2023 +#: includes/class-modal-checkout.php:2029 msgid "Complete transaction" msgstr "" -#: includes/class-modal-checkout.php:2024 +#: includes/class-modal-checkout.php:2030 msgid "Purchase" msgstr "" -#: includes/class-modal-checkout.php:2025 +#: includes/class-modal-checkout.php:2031 msgid "Edit billing information" msgstr "" -#: includes/class-modal-checkout.php:2026 dist/editor.js:29 +#: includes/class-modal-checkout.php:2032 dist/editor.js:29 #: src/blocks/checkout-button/edit.js:192 msgid "Cancel" msgstr "" -#: includes/class-modal-checkout.php:2027 +#: includes/class-modal-checkout.php:2033 msgid "Transaction successful" msgstr "" -#: includes/class-modal-checkout.php:2028 +#: includes/class-modal-checkout.php:2034 msgid "" "Your contribution directly funds our work. If you're moved to do so, you can " "opt to pay more than the standard rate." msgstr "" -#: includes/class-modal-checkout.php:2029 +#: includes/class-modal-checkout.php:2035 msgid "Thank you for your generosity! We couldn't do this without you!" msgstr "" -#: includes/class-modal-checkout.php:2030 +#: includes/class-modal-checkout.php:2036 msgid "Increase your support" msgstr "" -#: includes/class-modal-checkout.php:2031 +#: includes/class-modal-checkout.php:2037 #: src/modal-checkout/templates/form-coupon.php:20 msgid "Apply" msgstr "" +#: includes/class-modal-checkout.php:2038 +msgid "We ran into a problem processing this request. Please try again." +msgstr "" + #. Translators: %s is the site name. -#: includes/class-modal-checkout.php:2168 +#: includes/class-modal-checkout.php:2175 #, php-format msgid "" "Thank you for supporting %s. Your transaction was completed successfully." @@ -308,7 +308,7 @@ msgstr "" msgid " per " msgstr "" -#: includes/modal-checkout/class-checkout-data.php:301 dist/editor.js:35 +#: includes/modal-checkout/class-checkout-data.php:310 dist/editor.js:35 #: src/blocks/donate/index.js:31 msgid "Donate" msgstr "" diff --git a/languages/newspack-blocks-nb_NO.po b/languages/newspack-blocks-nb_NO.po index af68d3e04..32a0f4731 100644 --- a/languages/newspack-blocks-nb_NO.po +++ b/languages/newspack-blocks-nb_NO.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Newspack Blocks 1.0.0-alpha.20\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/project\n" -"POT-Creation-Date: 2025-11-13T18:38:30+00:00\n" +"POT-Creation-Date: 2025-11-24T20:10:24+00:00\n" "PO-Revision-Date: 2024-08-30 08:46-0700\n" "Last-Translator: \n" "Language-Team: \n" @@ -67,169 +67,169 @@ msgstr "" msgid "Or" msgstr "" -#: includes/class-modal-checkout.php:977 +#: includes/class-modal-checkout.php:979 includes/class-modal-checkout.php:983 msgid "Processing payment..." msgstr "" -#: includes/class-modal-checkout.php:981 +#: includes/class-modal-checkout.php:987 msgid "Verifying details..." msgstr "" -#: includes/class-modal-checkout.php:985 +#: includes/class-modal-checkout.php:991 msgid "Finalizing transaction..." msgstr "" -#: includes/class-modal-checkout.php:1041 +#: includes/class-modal-checkout.php:1047 msgid "" "We're sorry, there was an unexpected error. Please try again in a few " "minutes." msgstr "" -#: includes/class-modal-checkout.php:1053 +#: includes/class-modal-checkout.php:1059 msgid "Go back" msgstr "" -#: includes/class-modal-checkout.php:1143 +#: includes/class-modal-checkout.php:1149 msgid "Password mismatch" msgstr "" -#: includes/class-modal-checkout.php:1144 +#: includes/class-modal-checkout.php:1150 msgid "Password strength: Very weak" msgstr "" -#: includes/class-modal-checkout.php:1145 +#: includes/class-modal-checkout.php:1151 msgid "Password strength: Weak" msgstr "" -#: includes/class-modal-checkout.php:1146 +#: includes/class-modal-checkout.php:1152 msgid "Password strength: Medium" msgstr "" -#: includes/class-modal-checkout.php:1147 +#: includes/class-modal-checkout.php:1153 msgid "Password strength: Strong" msgstr "" -#: includes/class-modal-checkout.php:1328 +#: includes/class-modal-checkout.php:1334 msgid "Please enter someone else' email address to receive this gift." msgstr "" -#: includes/class-modal-checkout.php:1329 +#: includes/class-modal-checkout.php:1335 msgid "Please enter a valid email address to receive this gift." msgstr "" -#: includes/class-modal-checkout.php:1418 +#: includes/class-modal-checkout.php:1424 msgid "Close window" msgstr "" #. translators: %s: Site name. -#: includes/class-modal-checkout.php:1505 +#: includes/class-modal-checkout.php:1511 #, php-format msgid "" "You're already a subscriber! You can only have one active subscription at a " "time. Thank you for supporting %s." msgstr "" -#: includes/class-modal-checkout.php:1516 +#: includes/class-modal-checkout.php:1522 msgid "" "You're already a subscriber! You can only have one subscription at a time. " "If you wish to renew an expired subscription, please sign in and visit the " "subscriptions page on your account." msgstr "" -#: includes/class-modal-checkout.php:1554 -msgid "Could not complete this transaction. Please contact us for assistance." -msgstr "" - #. translators: 1: Checkout button confirmation text. 2: Order total. #. translators: 1 is the name of the item. 2 is the price of the item. -#: includes/class-modal-checkout.php:1640 -#: includes/modal-checkout/class-checkout-data.php:67 +#: includes/class-modal-checkout.php:1646 +#: includes/modal-checkout/class-checkout-data.php:68 #, php-format msgid "%1$s: %2$s" msgstr "" -#: includes/class-modal-checkout.php:1999 +#: includes/class-modal-checkout.php:2005 msgid "Billing details" msgstr "" -#: includes/class-modal-checkout.php:2000 +#: includes/class-modal-checkout.php:2006 msgid "Shipping details" msgstr "" -#: includes/class-modal-checkout.php:2001 +#: includes/class-modal-checkout.php:2007 msgid "Gift recipient" msgstr "" -#: includes/class-modal-checkout.php:2002 -#: includes/class-modal-checkout.php:2003 -#: includes/class-modal-checkout.php:2004 +#: includes/class-modal-checkout.php:2008 +#: includes/class-modal-checkout.php:2009 +#: includes/class-modal-checkout.php:2010 msgid "Complete your transaction" msgstr "" -#: includes/class-modal-checkout.php:2005 +#: includes/class-modal-checkout.php:2011 msgctxt "Login modal title when logged out user attempts to checkout." msgid "Sign in to complete transaction" msgstr "" -#: includes/class-modal-checkout.php:2010 +#: includes/class-modal-checkout.php:2016 msgctxt "Login modal title when unregistered user attempts to checkout" msgid "Register to complete transaction" msgstr "" -#: includes/class-modal-checkout.php:2015 +#: includes/class-modal-checkout.php:2021 msgid "Continue browsing" msgstr "" -#: includes/class-modal-checkout.php:2016 +#: includes/class-modal-checkout.php:2022 msgid "This donation is a gift" msgstr "" -#: includes/class-modal-checkout.php:2021 +#: includes/class-modal-checkout.php:2027 msgid "This purchase is a gift" msgstr "" -#: includes/class-modal-checkout.php:2023 +#: includes/class-modal-checkout.php:2029 msgid "Complete transaction" msgstr "" -#: includes/class-modal-checkout.php:2024 +#: includes/class-modal-checkout.php:2030 msgid "Purchase" msgstr "" -#: includes/class-modal-checkout.php:2025 +#: includes/class-modal-checkout.php:2031 msgid "Edit billing information" msgstr "" -#: includes/class-modal-checkout.php:2026 dist/editor.js:29 +#: includes/class-modal-checkout.php:2032 dist/editor.js:29 #: src/blocks/checkout-button/edit.js:192 msgid "Cancel" msgstr "" -#: includes/class-modal-checkout.php:2027 +#: includes/class-modal-checkout.php:2033 msgid "Transaction successful" msgstr "" -#: includes/class-modal-checkout.php:2028 +#: includes/class-modal-checkout.php:2034 msgid "" "Your contribution directly funds our work. If you're moved to do so, you can " "opt to pay more than the standard rate." msgstr "" -#: includes/class-modal-checkout.php:2029 +#: includes/class-modal-checkout.php:2035 msgid "Thank you for your generosity! We couldn't do this without you!" msgstr "" -#: includes/class-modal-checkout.php:2030 +#: includes/class-modal-checkout.php:2036 msgid "Increase your support" msgstr "" -#: includes/class-modal-checkout.php:2031 +#: includes/class-modal-checkout.php:2037 #: src/modal-checkout/templates/form-coupon.php:20 msgid "Apply" msgstr "" +#: includes/class-modal-checkout.php:2038 +msgid "We ran into a problem processing this request. Please try again." +msgstr "" + #. Translators: %s is the site name. -#: includes/class-modal-checkout.php:2168 +#: includes/class-modal-checkout.php:2175 #, php-format msgid "" "Thank you for supporting %s. Your transaction was completed successfully." @@ -308,7 +308,7 @@ msgstr "" msgid " per " msgstr "" -#: includes/modal-checkout/class-checkout-data.php:301 dist/editor.js:35 +#: includes/modal-checkout/class-checkout-data.php:310 dist/editor.js:35 #: src/blocks/donate/index.js:31 msgid "Donate" msgstr "" diff --git a/languages/newspack-blocks-pt_PT.po b/languages/newspack-blocks-pt_PT.po index 339cb2db5..4c8f7e82f 100644 --- a/languages/newspack-blocks-pt_PT.po +++ b/languages/newspack-blocks-pt_PT.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Newspack Blocks 1.0.0-alpha.25\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/project\n" -"POT-Creation-Date: 2025-11-13T18:38:30+00:00\n" +"POT-Creation-Date: 2025-11-24T20:10:24+00:00\n" "PO-Revision-Date: 2024-08-30 08:46-0700\n" "Last-Translator: \n" "Language-Team: \n" @@ -67,169 +67,169 @@ msgstr "" msgid "Or" msgstr "" -#: includes/class-modal-checkout.php:977 +#: includes/class-modal-checkout.php:979 includes/class-modal-checkout.php:983 msgid "Processing payment..." msgstr "" -#: includes/class-modal-checkout.php:981 +#: includes/class-modal-checkout.php:987 msgid "Verifying details..." msgstr "" -#: includes/class-modal-checkout.php:985 +#: includes/class-modal-checkout.php:991 msgid "Finalizing transaction..." msgstr "" -#: includes/class-modal-checkout.php:1041 +#: includes/class-modal-checkout.php:1047 msgid "" "We're sorry, there was an unexpected error. Please try again in a few " "minutes." msgstr "" -#: includes/class-modal-checkout.php:1053 +#: includes/class-modal-checkout.php:1059 msgid "Go back" msgstr "" -#: includes/class-modal-checkout.php:1143 +#: includes/class-modal-checkout.php:1149 msgid "Password mismatch" msgstr "" -#: includes/class-modal-checkout.php:1144 +#: includes/class-modal-checkout.php:1150 msgid "Password strength: Very weak" msgstr "" -#: includes/class-modal-checkout.php:1145 +#: includes/class-modal-checkout.php:1151 msgid "Password strength: Weak" msgstr "" -#: includes/class-modal-checkout.php:1146 +#: includes/class-modal-checkout.php:1152 msgid "Password strength: Medium" msgstr "" -#: includes/class-modal-checkout.php:1147 +#: includes/class-modal-checkout.php:1153 msgid "Password strength: Strong" msgstr "" -#: includes/class-modal-checkout.php:1328 +#: includes/class-modal-checkout.php:1334 msgid "Please enter someone else' email address to receive this gift." msgstr "" -#: includes/class-modal-checkout.php:1329 +#: includes/class-modal-checkout.php:1335 msgid "Please enter a valid email address to receive this gift." msgstr "" -#: includes/class-modal-checkout.php:1418 +#: includes/class-modal-checkout.php:1424 msgid "Close window" msgstr "" #. translators: %s: Site name. -#: includes/class-modal-checkout.php:1505 +#: includes/class-modal-checkout.php:1511 #, php-format msgid "" "You're already a subscriber! You can only have one active subscription at a " "time. Thank you for supporting %s." msgstr "" -#: includes/class-modal-checkout.php:1516 +#: includes/class-modal-checkout.php:1522 msgid "" "You're already a subscriber! You can only have one subscription at a time. " "If you wish to renew an expired subscription, please sign in and visit the " "subscriptions page on your account." msgstr "" -#: includes/class-modal-checkout.php:1554 -msgid "Could not complete this transaction. Please contact us for assistance." -msgstr "" - #. translators: 1: Checkout button confirmation text. 2: Order total. #. translators: 1 is the name of the item. 2 is the price of the item. -#: includes/class-modal-checkout.php:1640 -#: includes/modal-checkout/class-checkout-data.php:67 +#: includes/class-modal-checkout.php:1646 +#: includes/modal-checkout/class-checkout-data.php:68 #, php-format msgid "%1$s: %2$s" msgstr "" -#: includes/class-modal-checkout.php:1999 +#: includes/class-modal-checkout.php:2005 msgid "Billing details" msgstr "" -#: includes/class-modal-checkout.php:2000 +#: includes/class-modal-checkout.php:2006 msgid "Shipping details" msgstr "" -#: includes/class-modal-checkout.php:2001 +#: includes/class-modal-checkout.php:2007 msgid "Gift recipient" msgstr "" -#: includes/class-modal-checkout.php:2002 -#: includes/class-modal-checkout.php:2003 -#: includes/class-modal-checkout.php:2004 +#: includes/class-modal-checkout.php:2008 +#: includes/class-modal-checkout.php:2009 +#: includes/class-modal-checkout.php:2010 msgid "Complete your transaction" msgstr "" -#: includes/class-modal-checkout.php:2005 +#: includes/class-modal-checkout.php:2011 msgctxt "Login modal title when logged out user attempts to checkout." msgid "Sign in to complete transaction" msgstr "" -#: includes/class-modal-checkout.php:2010 +#: includes/class-modal-checkout.php:2016 msgctxt "Login modal title when unregistered user attempts to checkout" msgid "Register to complete transaction" msgstr "" -#: includes/class-modal-checkout.php:2015 +#: includes/class-modal-checkout.php:2021 msgid "Continue browsing" msgstr "" -#: includes/class-modal-checkout.php:2016 +#: includes/class-modal-checkout.php:2022 msgid "This donation is a gift" msgstr "" -#: includes/class-modal-checkout.php:2021 +#: includes/class-modal-checkout.php:2027 msgid "This purchase is a gift" msgstr "" -#: includes/class-modal-checkout.php:2023 +#: includes/class-modal-checkout.php:2029 msgid "Complete transaction" msgstr "" -#: includes/class-modal-checkout.php:2024 +#: includes/class-modal-checkout.php:2030 msgid "Purchase" msgstr "" -#: includes/class-modal-checkout.php:2025 +#: includes/class-modal-checkout.php:2031 msgid "Edit billing information" msgstr "" -#: includes/class-modal-checkout.php:2026 dist/editor.js:29 +#: includes/class-modal-checkout.php:2032 dist/editor.js:29 #: src/blocks/checkout-button/edit.js:192 msgid "Cancel" msgstr "" -#: includes/class-modal-checkout.php:2027 +#: includes/class-modal-checkout.php:2033 msgid "Transaction successful" msgstr "" -#: includes/class-modal-checkout.php:2028 +#: includes/class-modal-checkout.php:2034 msgid "" "Your contribution directly funds our work. If you're moved to do so, you can " "opt to pay more than the standard rate." msgstr "" -#: includes/class-modal-checkout.php:2029 +#: includes/class-modal-checkout.php:2035 msgid "Thank you for your generosity! We couldn't do this without you!" msgstr "" -#: includes/class-modal-checkout.php:2030 +#: includes/class-modal-checkout.php:2036 msgid "Increase your support" msgstr "" -#: includes/class-modal-checkout.php:2031 +#: includes/class-modal-checkout.php:2037 #: src/modal-checkout/templates/form-coupon.php:20 msgid "Apply" msgstr "" +#: includes/class-modal-checkout.php:2038 +msgid "We ran into a problem processing this request. Please try again." +msgstr "" + #. Translators: %s is the site name. -#: includes/class-modal-checkout.php:2168 +#: includes/class-modal-checkout.php:2175 #, php-format msgid "" "Thank you for supporting %s. Your transaction was completed successfully." @@ -308,7 +308,7 @@ msgstr "" msgid " per " msgstr "" -#: includes/modal-checkout/class-checkout-data.php:301 dist/editor.js:35 +#: includes/modal-checkout/class-checkout-data.php:310 dist/editor.js:35 #: src/blocks/donate/index.js:31 msgid "Donate" msgstr "Doação" diff --git a/languages/newspack-blocks.pot b/languages/newspack-blocks.pot index f48ae4523..d290bb7da 100644 --- a/languages/newspack-blocks.pot +++ b/languages/newspack-blocks.pot @@ -2,14 +2,14 @@ # This file is distributed under the same license as the Newspack Blocks plugin. msgid "" msgstr "" -"Project-Id-Version: Newspack Blocks 4.17.4\n" +"Project-Id-Version: Newspack Blocks 4.18.0\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/project\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2025-11-13T18:38:30+00:00\n" +"POT-Creation-Date: 2025-11-24T20:10:24+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.12.0\n" "X-Domain: newspack-blocks\n" @@ -68,161 +68,162 @@ msgstr "" msgid "Or" msgstr "" -#: includes/class-modal-checkout.php:977 +#: includes/class-modal-checkout.php:979 +#: includes/class-modal-checkout.php:983 msgid "Processing payment..." msgstr "" -#: includes/class-modal-checkout.php:981 +#: includes/class-modal-checkout.php:987 msgid "Verifying details..." msgstr "" -#: includes/class-modal-checkout.php:985 +#: includes/class-modal-checkout.php:991 msgid "Finalizing transaction..." msgstr "" -#: includes/class-modal-checkout.php:1041 +#: includes/class-modal-checkout.php:1047 msgid "We're sorry, there was an unexpected error. Please try again in a few minutes." msgstr "" -#: includes/class-modal-checkout.php:1053 +#: includes/class-modal-checkout.php:1059 msgid "Go back" msgstr "" -#: includes/class-modal-checkout.php:1143 +#: includes/class-modal-checkout.php:1149 msgid "Password mismatch" msgstr "" -#: includes/class-modal-checkout.php:1144 +#: includes/class-modal-checkout.php:1150 msgid "Password strength: Very weak" msgstr "" -#: includes/class-modal-checkout.php:1145 +#: includes/class-modal-checkout.php:1151 msgid "Password strength: Weak" msgstr "" -#: includes/class-modal-checkout.php:1146 +#: includes/class-modal-checkout.php:1152 msgid "Password strength: Medium" msgstr "" -#: includes/class-modal-checkout.php:1147 +#: includes/class-modal-checkout.php:1153 msgid "Password strength: Strong" msgstr "" -#: includes/class-modal-checkout.php:1328 +#: includes/class-modal-checkout.php:1334 msgid "Please enter someone else' email address to receive this gift." msgstr "" -#: includes/class-modal-checkout.php:1329 +#: includes/class-modal-checkout.php:1335 msgid "Please enter a valid email address to receive this gift." msgstr "" -#: includes/class-modal-checkout.php:1418 +#: includes/class-modal-checkout.php:1424 msgid "Close window" msgstr "" #. translators: %s: Site name. -#: includes/class-modal-checkout.php:1505 +#: includes/class-modal-checkout.php:1511 #, php-format msgid "You're already a subscriber! You can only have one active subscription at a time. Thank you for supporting %s." msgstr "" -#: includes/class-modal-checkout.php:1516 +#: includes/class-modal-checkout.php:1522 msgid "You're already a subscriber! You can only have one subscription at a time. If you wish to renew an expired subscription, please sign in and visit the subscriptions page on your account." msgstr "" -#: includes/class-modal-checkout.php:1554 -msgid "Could not complete this transaction. Please contact us for assistance." -msgstr "" - #. translators: 1: Checkout button confirmation text. 2: Order total. #. translators: 1 is the name of the item. 2 is the price of the item. -#: includes/class-modal-checkout.php:1640 -#: includes/modal-checkout/class-checkout-data.php:67 +#: includes/class-modal-checkout.php:1646 +#: includes/modal-checkout/class-checkout-data.php:68 #, php-format msgid "%1$s: %2$s" msgstr "" -#: includes/class-modal-checkout.php:1999 +#: includes/class-modal-checkout.php:2005 msgid "Billing details" msgstr "" -#: includes/class-modal-checkout.php:2000 +#: includes/class-modal-checkout.php:2006 msgid "Shipping details" msgstr "" -#: includes/class-modal-checkout.php:2001 +#: includes/class-modal-checkout.php:2007 msgid "Gift recipient" msgstr "" -#: includes/class-modal-checkout.php:2002 -#: includes/class-modal-checkout.php:2003 -#: includes/class-modal-checkout.php:2004 +#: includes/class-modal-checkout.php:2008 +#: includes/class-modal-checkout.php:2009 +#: includes/class-modal-checkout.php:2010 msgid "Complete your transaction" msgstr "" -#: includes/class-modal-checkout.php:2005 +#: includes/class-modal-checkout.php:2011 msgctxt "Login modal title when logged out user attempts to checkout." msgid "Sign in to complete transaction" msgstr "" -#: includes/class-modal-checkout.php:2010 +#: includes/class-modal-checkout.php:2016 msgctxt "Login modal title when unregistered user attempts to checkout" msgid "Register to complete transaction" msgstr "" -#: includes/class-modal-checkout.php:2015 +#: includes/class-modal-checkout.php:2021 msgid "Continue browsing" msgstr "" -#: includes/class-modal-checkout.php:2016 +#: includes/class-modal-checkout.php:2022 msgid "This donation is a gift" msgstr "" -#: includes/class-modal-checkout.php:2021 +#: includes/class-modal-checkout.php:2027 msgid "This purchase is a gift" msgstr "" -#: includes/class-modal-checkout.php:2023 +#: includes/class-modal-checkout.php:2029 msgid "Complete transaction" msgstr "" -#: includes/class-modal-checkout.php:2024 +#: includes/class-modal-checkout.php:2030 msgid "Purchase" msgstr "" -#: includes/class-modal-checkout.php:2025 +#: includes/class-modal-checkout.php:2031 msgid "Edit billing information" msgstr "" -#: includes/class-modal-checkout.php:2026 +#: includes/class-modal-checkout.php:2032 #: dist/editor.js:29 #: src/blocks/checkout-button/edit.js:192 msgid "Cancel" msgstr "" -#: includes/class-modal-checkout.php:2027 +#: includes/class-modal-checkout.php:2033 msgid "Transaction successful" msgstr "" -#: includes/class-modal-checkout.php:2028 +#: includes/class-modal-checkout.php:2034 msgid "Your contribution directly funds our work. If you're moved to do so, you can opt to pay more than the standard rate." msgstr "" -#: includes/class-modal-checkout.php:2029 +#: includes/class-modal-checkout.php:2035 msgid "Thank you for your generosity! We couldn't do this without you!" msgstr "" -#: includes/class-modal-checkout.php:2030 +#: includes/class-modal-checkout.php:2036 msgid "Increase your support" msgstr "" -#: includes/class-modal-checkout.php:2031 +#: includes/class-modal-checkout.php:2037 #: src/modal-checkout/templates/form-coupon.php:20 msgid "Apply" msgstr "" +#: includes/class-modal-checkout.php:2038 +msgid "We ran into a problem processing this request. Please try again." +msgstr "" + #. Translators: %s is the site name. -#: includes/class-modal-checkout.php:2168 +#: includes/class-modal-checkout.php:2175 #, php-format msgid "Thank you for supporting %s. Your transaction was completed successfully." msgstr "" @@ -300,7 +301,7 @@ msgstr "" msgid " per " msgstr "" -#: includes/modal-checkout/class-checkout-data.php:301 +#: includes/modal-checkout/class-checkout-data.php:310 #: dist/editor.js:35 #: src/blocks/donate/index.js:31 msgid "Donate" diff --git a/newspack-blocks.php b/newspack-blocks.php index 987de23ed..07f2a00cf 100755 --- a/newspack-blocks.php +++ b/newspack-blocks.php @@ -7,7 +7,7 @@ * Author URI: https://newspack.com/ * Text Domain: newspack-blocks * Domain Path: /languages - * Version: 4.18.0 + * Version: 4.19.0-alpha.1 * * @package Newspack_Blocks */ @@ -15,13 +15,14 @@ define( 'NEWSPACK_BLOCKS__PLUGIN_FILE', __FILE__ ); define( 'NEWSPACK_BLOCKS__BLOCKS_DIRECTORY', 'dist/' ); define( 'NEWSPACK_BLOCKS__PLUGIN_DIR', plugin_dir_path( NEWSPACK_BLOCKS__PLUGIN_FILE ) ); -define( 'NEWSPACK_BLOCKS__VERSION', '4.18.0' ); +define( 'NEWSPACK_BLOCKS__VERSION', '4.19.0-alpha.1' ); require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/class-newspack-blocks.php'; require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/class-newspack-blocks-api.php'; require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/class-newspack-blocks-patterns.php'; require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/class-newspack-blocks-caching.php'; require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/modal-checkout/class-checkout-data.php'; +require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/modal-checkout/class-change-payment-gateway.php'; require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/class-modal-checkout.php'; require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/plugins/class-the-events-calendar.php'; diff --git a/package-lock.json b/package-lock.json index fe474f064..fec593676 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "swiper": "12.0.3" }, "devDependencies": { - "@types/lodash": "^4.17.20", + "@types/lodash": "^4.17.21", "newspack-components": "^4.2.0", "newspack-scripts": "^5.8.0" } @@ -7366,10 +7366,11 @@ "license": "MIT" }, "node_modules/@types/lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-H3MHACvFUEiujabxhaI/ImO6gUrd8oOurg7LQtS7mbwIXA/cUqWrvBsaeJ23aZEPk1TAYkurjfMbSELfoCXlGA==", - "dev": true + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-FOvQ0YPD5NOfPgMzJihoT+Za5pdkDJWcbpuj1DjaKZIr/gxodQjY/uWEFlTNqW2ugXHUiL8lRQgw63dzKHZdeQ==", + "dev": true, + "license": "MIT" }, "node_modules/@types/mime": { "version": "1.3.5", diff --git a/package.json b/package.json index 567b2bc82..ff4abc32b 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "swiper": "12.0.3" }, "devDependencies": { - "@types/lodash": "^4.17.20", + "@types/lodash": "^4.17.21", "newspack-components": "^4.2.0", "newspack-scripts": "^5.8.0" }, diff --git a/src/blocks/carousel/editor.scss b/src/blocks/carousel/editor.scss index 493ec7a0b..568d4d4e4 100644 --- a/src/blocks/carousel/editor.scss +++ b/src/blocks/carousel/editor.scss @@ -1,6 +1,10 @@ @use "newspack-colors" as np-colors; @use "../../shared/sass/placeholder"; +.wp-block:has(> .wpnbpc) { + max-width: 100%; +} + .wp-block-newspack-blocks-carousel { .swiper-wrapper { height: auto; @@ -43,6 +47,7 @@ margin-right: 1.5em; } } + .editor-block-list__layout .editor-block-list__block .wpnbpc .entry-title a, .editor-block-list__layout .editor-block-list__block .wpnbpc .entry-meta .byline a { color: inherit; diff --git a/src/blocks/carousel/view.scss b/src/blocks/carousel/view.scss index 5201571ec..bdc9e01e7 100644 --- a/src/blocks/carousel/view.scss +++ b/src/blocks/carousel/view.scss @@ -6,6 +6,7 @@ .wp-block-newspack-blocks-carousel { position: relative; margin-top: 0; + max-width: 100%; article { max-width: 100%; diff --git a/src/modal-checkout/index.js b/src/modal-checkout/index.js index 813bd2a12..5238186d5 100644 --- a/src/modal-checkout/index.js +++ b/src/modal-checkout/index.js @@ -8,7 +8,7 @@ import './checkout.scss'; * Internal dependencies */ import { manageCheckoutAttempt, manageCheckoutSuccess, manageLoaded, managePagination } from './analytics'; -import { domReady } from './utils'; +import { domReady, onCheckoutPlaceOrderProcessing } from './utils'; ( $ => { domReady( () => { @@ -26,6 +26,7 @@ import { domReady } from './utils'; const placeOrderStartEvent = new CustomEvent( 'checkout-place-order-start' ); const placeOrderSuccessEvent = new CustomEvent( 'checkout-place-order-success' ); const placeOrderErrorEvent = new CustomEvent( 'checkout-place-order-error' ); + const placeOrderCriticalErrorEvent = new CustomEvent( 'checkout-place-order-critical-error' ); function getEventHandlers( element, event ) { const events = $._data( element, 'events' ); @@ -121,16 +122,30 @@ import { domReady } from './utils'; placedOrder = true; container.dispatchEvent( placeOrderStartEvent ); } ); + onCheckoutPlaceOrderProcessing( container, function () { + if ( ! placedOrder ) { + return; + } + // If the form stops processing before the `checkout_place_order_success` event is fired, dispatch an error event. + if ( ! $form.is( '.processing' ) ) { + placedOrder = false; + container.dispatchEvent( placeOrderErrorEvent ); + } + } ); $form.on( 'checkout_place_order_success', function () { placedOrder = false; container.dispatchEvent( placeOrderSuccessEvent ); } ); - $( document.body ).on( 'checkout_error', function () { + $( document.body ).on( 'checkout_error', function ( event, errors ) { if ( ! placedOrder ) { return; } placedOrder = false; + if ( errors && errors.indexOf( newspackBlocksModalCheckout.labels.critical_error ) >= 0 ) { + container.dispatchEvent( placeOrderCriticalErrorEvent ); + return; + } container.dispatchEvent( placeOrderErrorEvent ); } ); $form.on( 'update_checkout', function () { diff --git a/src/modal-checkout/modal.js b/src/modal-checkout/modal.js index 09f20f1b7..a1eaaee04 100644 --- a/src/modal-checkout/modal.js +++ b/src/modal-checkout/modal.js @@ -18,6 +18,7 @@ import { onCheckoutCancel, onCheckoutPlaceOrderStart, onCheckoutPlaceOrderError, + onCheckoutPlaceOrderCriticalError, createHiddenInput, triggerFormSubmit, getCheckoutData, @@ -39,6 +40,9 @@ let inCheckoutIntent = false; // Checkout title. let checkoutTitle = newspackBlocksModal.labels.checkout_modal_title; +// Last-submitted checkout form. +let activeCheckoutForm = null; + // Close the modal. const closeModal = el => { if ( el.overlayId && window.newspackReaderActivation?.overlays ) { @@ -129,13 +133,14 @@ domReady( () => { processingPaymentTimeouts = []; }; - const renderProcessingPaymentScreen = () => { + const renderProcessingPaymentScreen = event => { spinner.querySelectorAll( `.${ PROCESSING_PAYMENT_TEXT_CLASS }` ).forEach( node => node.remove() ); spinner.style.display = 'flex'; clearProcessingPaymentTimeouts(); processingPaymentText.textContent = PROCESSING_PAYMENT_MESSAGES[ 0 ]?.text ?? ''; PROCESSING_PAYMENT_MESSAGES.slice( 1 ).forEach( ( { text, delay } ) => { const timeoutId = setTimeout( () => { + event.target.dispatchEvent( new CustomEvent( 'checkout-place-order-processing' ) ); processingPaymentText.textContent = text; }, delay ); processingPaymentTimeouts.push( timeoutId ); @@ -164,6 +169,15 @@ domReady( () => { summaryTextNode.textContent = checkoutData.price_summary; } + // Display initial errors if any. + if ( modalCheckout.initialErrors ) { + const errorContainer = document.createElement( 'div' ); + errorContainer.classList.add( 'woocommerce-error' ); + errorContainer.textContent = modalCheckout.initialErrors; + container.prepend( errorContainer ); + delete modalCheckout.initialErrors; + } + // Revert modal title and width default value. setModalSize(); setModalTitle( checkoutTitle ); @@ -192,6 +206,20 @@ domReady( () => { hideProcessingPaymentScreen(); } ); + + // Resubmit modal checkout form if an unrecoverable error is encountered. + const refreshCheckout = form => { + if ( ! form ) { + return; + } + closeCheckout(); + spinner.style.display = 'none'; + modalCheckout.initialErrors = newspackBlocksModal.labels.critical_error; + form.requestSubmit( form.querySelector( 'button[type="submit"]' ) ); + hideProcessingPaymentScreen(); + }; + + onCheckoutPlaceOrderCriticalError( container, () => refreshCheckout( activeCheckoutForm ) ); } iframeReady( iframe, handleIframeReady, () => { @@ -468,6 +496,7 @@ domReady( () => { // Append product data info to the modal, so we can grab it for GA4 events outside of the iframe. document.getElementById( 'newspack_modal_checkout' ).setAttribute( 'data-checkout', JSON.stringify( checkoutData ) ); } + activeCheckoutForm = form; }; /** diff --git a/src/modal-checkout/utils.js b/src/modal-checkout/utils.js index d94794f38..e36a470e4 100644 --- a/src/modal-checkout/utils.js +++ b/src/modal-checkout/utils.js @@ -180,16 +180,16 @@ export function onCheckoutPlaceOrderStart( container, callback ) { } /** - * Run a callback when the checkout place order succeeds. + * Run a callback when the checkout place order is processing. * * @param {Object} container The container element inside the iframe document. - * @param {Function} callback The callback to execute when the checkout place order succeeds. + * @param {Function} callback The callback to execute when the checkout place order is processing. */ -export function onCheckoutPlaceOrderSuccess( container, callback ) { - if ( container.checkoutPlaceOrderSuccess ) { +export function onCheckoutPlaceOrderProcessing( container, callback ) { + if ( container.checkoutPlaceOrderProcessing ) { callback(); } else { - container.addEventListener( 'checkout-place-order-success', callback ); + container.addEventListener( 'checkout-place-order-processing', callback ); } } @@ -207,6 +207,20 @@ export function onCheckoutPlaceOrderError( container, callback ) { } } +/** + * Run a callback when the checkout place order fails in an unrecoverable state. + * + * @param {Object} container The container element inside the iframe document. + * @param {Function} callback The callback to execute when the checkout place order fails in an unrecoverable state. + */ +export function onCheckoutPlaceOrderCriticalError( container, callback ) { + if ( container.checkoutPlaceOrderCriticalError ) { + callback(); + } else { + container.addEventListener( 'checkout-place-order-critical-error', callback ); + } +} + /** * Run a callback when the checkout is complete. *