From 8c58daf937b7566ddd017b71a8158f555285bdab Mon Sep 17 00:00:00 2001 From: Fulvio Notarstefano Date: Wed, 15 Nov 2023 18:14:50 +0800 Subject: [PATCH] Release: v5.11.11 (#641) Co-authored-by: Illimar Tambek (GoDaddy) <77076466+itambek-godaddy@users.noreply.github.com> Co-authored-by: Fulvio Notarstefano --- composer.json | 2 +- package-lock.json | 4 +- package.json | 2 +- .../gateway-test-plugin/includes/API.php | 2 +- .../gateway-test-plugin/includes/Gateway.php | 2 +- .../gateway-test-plugin/includes/Plugin.php | 2 +- .../plugins/test-plugin/includes/API.php | 2 +- .../plugins/test-plugin/includes/Gateway.php | 2 +- .../plugins/test-plugin/includes/Plugin.php | 2 +- .../integration/API/CacheableAPIBaseTest.php | 10 +- tests/integration/DependenciesTest.php | 6 +- tests/integration/HelperTest.php | 4 +- tests/integration/PluginTest.php | 6 +- .../REST_API/Controllers/SettingsTest.php | 10 +- tests/integration/REST_API/RESTAPITest.php | 8 +- .../SV_WC_Payment_Gateway_Helper_Test.php | 4 +- .../Settings_API/AbstractSettingsTest.php | 12 +- .../integration/Settings_API/SettingTest.php | 4 +- .../payment-gateway/GatewayPluginTest.php | 2 +- .../payment-gateway/MyPaymentMethodsTest.php | 8 +- .../payment-gateway/PaymentFormTest.php | 6 +- ..._WC_Payment_Gateway_Payment_Token_Test.php | 4 +- ...nt_Gateway_Payment_Tokens_Handler_Test.php | 4 +- .../apple-pay/ApplePayFrontendTest.php | 10 +- tests/unit/API/CacheableRequestTraitTest.php | 2 +- tests/unit/CountryHelperTest.php | 4 +- tests/unit/Settings_API/ControlTest.php | 4 +- tests/unit/Settings_API/SettingTest.php | 24 +- ...ommerce-framework-plugin-loader-sample.php | 2 +- woocommerce/Addresses/Address.php | 4 +- woocommerce/Addresses/Customer_Address.php | 4 +- woocommerce/Blocks/Blocks_Handler.php | 187 +++ woocommerce/Country_Helper.php | 4 +- woocommerce/Handlers/Script_Handler.php | 10 +- woocommerce/Lifecycle.php | 12 +- .../Settings_API/Abstract_Settings.php | 6 +- woocommerce/Settings_API/Control.php | 6 +- woocommerce/Settings_API/Setting.php | 6 +- woocommerce/admin/Notes_Helper.php | 4 +- ...stract-sv-wc-plugin-admin-setup-wizard.php | 6 +- .../api/Abstract_Cacheable_API_Base.php | 8 +- .../api/abstract-sv-wc-api-json-request.php | 4 +- .../api/abstract-sv-wc-api-json-response.php | 4 +- .../api/abstract-sv-wc-api-xml-request.php | 4 +- .../api/abstract-sv-wc-api-xml-response.php | 4 +- woocommerce/api/class-sv-wc-api-base.php | 4 +- woocommerce/api/class-sv-wc-api-exception.php | 4 +- .../api/interface-sv-wc-api-request.php | 4 +- .../api/interface-sv-wc-api-response.php | 4 +- .../api/traits/Cacheable_Request_Trait.php | 4 +- woocommerce/changelog.txt | 6 + .../class-sv-wc-admin-notice-handler.php | 4 +- woocommerce/class-sv-wc-helper.php | 4 +- woocommerce/class-sv-wc-hook-deprecator.php | 4 +- .../class-sv-wc-plugin-compatibility.php | 4 +- .../class-sv-wc-plugin-dependencies.php | 4 +- woocommerce/class-sv-wc-plugin-exception.php | 4 +- woocommerce/class-sv-wc-plugin.php | 146 ++- .../class-sv-wp-admin-message-handler.php | 4 +- .../abstract-sv-wc-data-compatibility.php | 4 +- .../class-sv-wc-order-compatibility.php | 4 +- ...class-sv-wc-subscription-compatibility.php | 4 +- .../woocommerce-plugin-framework.pot | 1061 ++++++++--------- .../External_Checkout/Admin.php | 4 +- .../External_Checkout/External_Checkout.php | 6 +- .../External_Checkout/Frontend.php | 14 +- .../External_Checkout/Google_Pay/AJAX.php | 8 +- .../External_Checkout/Google_Pay/Admin.php | 8 +- .../External_Checkout/Google_Pay/Frontend.php | 12 +- .../Google_Pay/Google_Pay.php | 16 +- .../External_Checkout/Orders.php | 4 +- ...-payment-gateway-apple-pay-api-request.php | 4 +- ...payment-gateway-apple-pay-api-response.php | 4 +- ...ss-sv-wc-payment-gateway-apple-pay-api.php | 6 +- ...ent-gateway-apple-pay-payment-response.php | 4 +- ...-sv-wc-payment-gateway-apple-pay-admin.php | 6 +- ...s-sv-wc-payment-gateway-apple-pay-ajax.php | 4 +- ...-wc-payment-gateway-apple-pay-frontend.php | 10 +- .../class-sv-wc-payment-gateway-apple-pay.php | 8 +- .../Abstract_Hosted_Payment_Handler.php | 6 +- .../Handlers/Abstract_Payment_Handler.php | 6 +- .../payment-gateway/Handlers/Capture.php | 6 +- ...ment-gateway-plugin-admin-setup-wizard.php | 6 +- ...lass-sv-wc-payment-gateway-admin-order.php | 4 +- ...ent-gateway-admin-payment-token-editor.php | 4 +- ...-wc-payment-gateway-admin-user-handler.php | 4 +- ...nt-gateway-api-response-message-helper.php | 4 +- ...ent-gateway-api-authorization-response.php | 4 +- ...eway-api-create-payment-token-response.php | 4 +- ...-payment-gateway-api-customer-response.php | 4 +- ...get-tokenized-payment-methods-response.php | 4 +- ...ment-notification-credit-card-response.php | 4 +- ...i-payment-notification-echeck-response.php | 4 +- ...eway-api-payment-notification-response.php | 4 +- ...ent-notification-tokenization-response.php | 4 +- ...face-sv-wc-payment-gateway-api-request.php | 4 +- ...ace-sv-wc-payment-gateway-api-response.php | 4 +- .../interface-sv-wc-payment-gateway-api.php | 4 +- .../sv-wc-payment-gateway-apple-pay.js | 2 +- .../sv-wc-payment-gateway-apple-pay.js.map | 2 +- .../sv-wc-payment-gateway-google-pay.js | 2 +- .../sv-wc-payment-gateway-google-pay.js.map | 2 +- ...v-wc-payment-gateway-my-payment-methods.js | 2 +- ...-payment-gateway-my-payment-methods.js.map | 2 +- .../sv-wc-payment-gateway-payment-form.js | 2 +- .../sv-wc-payment-gateway-payment-form.js.map | 2 +- .../sv-wc-payment-gateway-apple-pay.coffee | 4 +- .../sv-wc-payment-gateway-google-pay.js | 6 +- ...-payment-gateway-my-payment-methods.coffee | 4 +- .../sv-wc-payment-gateway-payment-form.coffee | 6 +- .../class-sv-wc-payment-gateway-direct.php | 4 +- .../class-sv-wc-payment-gateway-helper.php | 4 +- .../class-sv-wc-payment-gateway-hosted.php | 4 +- ...-wc-payment-gateway-my-payment-methods.php | 8 +- ...ass-sv-wc-payment-gateway-payment-form.php | 6 +- .../class-sv-wc-payment-gateway-plugin.php | 8 +- .../class-sv-wc-payment-gateway-privacy.php | 4 +- .../class-sv-wc-payment-gateway.php | 6 +- .../class-sv-wc-payment-gateway-exception.php | 4 +- ...ract-sv-wc-payment-gateway-integration.php | 4 +- ...payment-gateway-integration-pre-orders.php | 4 +- ...ment-gateway-integration-subscriptions.php | 30 +- ...ss-sv-wc-payment-gateway-payment-token.php | 4 +- ...payment-gateway-payment-tokens-handler.php | 4 +- ...-sv-wc-payment-gateway-plugin-rest-api.php | 10 +- woocommerce/rest-api/Controllers/Settings.php | 8 +- .../rest-api/class-sv-wc-plugin-rest-api.php | 4 +- .../utilities/class-sv-wp-async-request.php | 4 +- .../class-sv-wp-background-job-handler.php | 4 +- .../class-sv-wp-job-batch-handler.php | 4 +- 130 files changed, 1172 insertions(+), 894 deletions(-) create mode 100644 woocommerce/Blocks/Blocks_Handler.php diff --git a/composer.json b/composer.json index d76810572..2df37de9b 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "skyverge/wc-plugin-framework", "description": "The official SkyVerge WooCommerce plugin framework", - "version": "5.11.10", + "version": "5.11.11", "license": "GPL-3.0", "minimum-stability": "dev", "prefer-stable": true, diff --git a/package-lock.json b/package-lock.json index 21d86c112..685a9b1bb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "wc-plugin-framework", - "version": "5.11.10", + "version": "5.11.11", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "wc-plugin-framework", - "version": "5.11.10", + "version": "5.11.11", "license": "GPL-3.0", "devDependencies": { "coffeescript": "^2.5.1", diff --git a/package.json b/package.json index 8ff1d8d2b..9830dac25 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wc-plugin-framework", - "version": "5.11.10", + "version": "5.11.11", "title": "WooCommerce Plugin Framework", "author": "SkyVerge Team", "homepage": "https://github.com/skyverge/wc-plugin-framework#readme", diff --git a/tests/_support/plugins/gateway-test-plugin/includes/API.php b/tests/_support/plugins/gateway-test-plugin/includes/API.php index da3d59f02..a5e8ee5da 100644 --- a/tests/_support/plugins/gateway-test-plugin/includes/API.php +++ b/tests/_support/plugins/gateway-test-plugin/includes/API.php @@ -2,7 +2,7 @@ namespace SkyVerge\WooCommerce\GatewayTestPlugin; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10 as Framework; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11 as Framework; defined( 'ABSPATH' ) or exit; diff --git a/tests/_support/plugins/gateway-test-plugin/includes/Gateway.php b/tests/_support/plugins/gateway-test-plugin/includes/Gateway.php index 42bd0e467..d069f0dda 100644 --- a/tests/_support/plugins/gateway-test-plugin/includes/Gateway.php +++ b/tests/_support/plugins/gateway-test-plugin/includes/Gateway.php @@ -2,7 +2,7 @@ namespace SkyVerge\WooCommerce\GatewayTestPlugin; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10 as Framework; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11 as Framework; defined( 'ABSPATH' ) or exit; diff --git a/tests/_support/plugins/gateway-test-plugin/includes/Plugin.php b/tests/_support/plugins/gateway-test-plugin/includes/Plugin.php index 32a6f2de3..4022a6f03 100644 --- a/tests/_support/plugins/gateway-test-plugin/includes/Plugin.php +++ b/tests/_support/plugins/gateway-test-plugin/includes/Plugin.php @@ -1,7 +1,7 @@ assertInstanceOf( '\SkyVerge\WooCommerce\PluginFramework\v5_11_10\SV_WC_Plugin_Dependencies', $this->get_plugin()->get_dependency_handler() ); + $this->assertInstanceOf( '\SkyVerge\WooCommerce\PluginFramework\v5_11_11\SV_WC_Plugin_Dependencies', $this->get_plugin()->get_dependency_handler() ); } @@ -161,7 +161,7 @@ public function test_get_dependency_handler() { */ public function test_get_lifecycle_handler() { - $this->assertInstanceOf( '\SkyVerge\WooCommerce\PluginFramework\v5_11_10\Plugin\Lifecycle', $this->get_plugin()->get_lifecycle_handler() ); + $this->assertInstanceOf( '\SkyVerge\WooCommerce\PluginFramework\v5_11_11\Plugin\Lifecycle', $this->get_plugin()->get_lifecycle_handler() ); } diff --git a/tests/integration/REST_API/Controllers/SettingsTest.php b/tests/integration/REST_API/Controllers/SettingsTest.php index 44b170917..a1f560051 100644 --- a/tests/integration/REST_API/Controllers/SettingsTest.php +++ b/tests/integration/REST_API/Controllers/SettingsTest.php @@ -1,14 +1,14 @@ render_js(); $this->assertStringContainsString( 'function load_gateway_test_plugin_payment_methods_handler', $wc_queued_js ); - $this->assertStringContainsString( 'window.jQuery( document.body ).on( \'sv_wc_payment_methods_handler_v5_11_10_loaded\', load_gateway_test_plugin_payment_methods_handler );', $wc_queued_js ); + $this->assertStringContainsString( 'window.jQuery( document.body ).on( \'sv_wc_payment_methods_handler_v5_11_11_loaded\', load_gateway_test_plugin_payment_methods_handler );', $wc_queued_js ); } diff --git a/tests/integration/payment-gateway/PaymentFormTest.php b/tests/integration/payment-gateway/PaymentFormTest.php index 9a49d4599..daa1436be 100644 --- a/tests/integration/payment-gateway/PaymentFormTest.php +++ b/tests/integration/payment-gateway/PaymentFormTest.php @@ -1,11 +1,11 @@ get_plugin()->get_gateway()->get_payment_form_instance()->render_js(); $this->assertStringContainsString( 'function load_test_gateway_payment_form_handler', $wc_queued_js ); - $this->assertStringContainsString( 'window.jQuery( document.body ).on( \'sv_wc_payment_form_handler_v5_11_10_loaded\', load_test_gateway_payment_form_handler );', $wc_queued_js ); + $this->assertStringContainsString( 'window.jQuery( document.body ).on( \'sv_wc_payment_form_handler_v5_11_11_loaded\', load_test_gateway_payment_form_handler );', $wc_queued_js ); } diff --git a/tests/integration/payment-gateway/SV_WC_Payment_Gateway_Payment_Token_Test.php b/tests/integration/payment-gateway/SV_WC_Payment_Gateway_Payment_Token_Test.php index a9e87ebbc..ab77f40b3 100644 --- a/tests/integration/payment-gateway/SV_WC_Payment_Gateway_Payment_Token_Test.php +++ b/tests/integration/payment-gateway/SV_WC_Payment_Gateway_Payment_Token_Test.php @@ -1,11 +1,11 @@ invokeArgs( $frontend_instance, [[]] ); $this->assertStringContainsString( 'function load_test_gateway_apple_pay_handler', $wc_queued_js ); - $this->assertStringContainsString( 'window.jQuery( document.body ).on( \'sv_wc_apple_pay_handler_v5_11_10_loaded\', load_test_gateway_apple_pay_handler );', $wc_queued_js ); + $this->assertStringContainsString( 'window.jQuery( document.body ).on( \'sv_wc_apple_pay_handler_v5_11_11_loaded\', load_test_gateway_apple_pay_handler );', $wc_queued_js ); } diff --git a/tests/unit/API/CacheableRequestTraitTest.php b/tests/unit/API/CacheableRequestTraitTest.php index 7c3ff609f..52c781c3b 100644 --- a/tests/unit/API/CacheableRequestTraitTest.php +++ b/tests/unit/API/CacheableRequestTraitTest.php @@ -2,7 +2,7 @@ namespace API; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\API\Traits\Cacheable_Request_Trait; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\API\Traits\Cacheable_Request_Trait; if ( ! defined( 'ABSPATH' ) ) { define( 'ABSPATH', true ); diff --git a/tests/unit/CountryHelperTest.php b/tests/unit/CountryHelperTest.php index aaa439a26..588f93d46 100644 --- a/tests/unit/CountryHelperTest.php +++ b/tests/unit/CountryHelperTest.php @@ -19,7 +19,7 @@ protected function _after() { } /** - * Tests \SkyVerge\WooCommerce\PluginFramework\v5_11_10\Country_Helper::convert_alpha_country_code() + * Tests \SkyVerge\WooCommerce\PluginFramework\v5_11_11\Country_Helper::convert_alpha_country_code() * * @param string $code input country code * @param string $expected expected return value @@ -28,7 +28,7 @@ protected function _after() { */ public function test_convert_alpha_country_code( $code, $expected ) { - $result = \SkyVerge\WooCommerce\PluginFramework\v5_11_10\Country_Helper::convert_alpha_country_code( $code ); + $result = \SkyVerge\WooCommerce\PluginFramework\v5_11_11\Country_Helper::convert_alpha_country_code( $code ); $this->assertEquals( $expected, $result ); } diff --git a/tests/unit/Settings_API/ControlTest.php b/tests/unit/Settings_API/ControlTest.php index 351b48c2a..0e9dc9f03 100644 --- a/tests/unit/Settings_API/ControlTest.php +++ b/tests/unit/Settings_API/ControlTest.php @@ -2,8 +2,8 @@ namespace Settings_API; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\Settings_API\Control; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\SV_WC_Plugin_Exception; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\Settings_API\Control; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\SV_WC_Plugin_Exception; use TypeError; if ( ! defined( 'ABSPATH' ) ) { diff --git a/tests/unit/Settings_API/SettingTest.php b/tests/unit/Settings_API/SettingTest.php index 338227c80..1e82685ac 100644 --- a/tests/unit/Settings_API/SettingTest.php +++ b/tests/unit/Settings_API/SettingTest.php @@ -2,9 +2,9 @@ namespace Settings_API; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\Settings_API\Control; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\Settings_API\Setting; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\SV_WC_Plugin_Exception; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\Settings_API\Control; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\Settings_API\Setting; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\SV_WC_Plugin_Exception; if ( ! defined( 'ABSPATH' ) ) { define( 'ABSPATH', true ); @@ -36,7 +36,7 @@ protected function _after() { /** - * Tests \SkyVerge\WooCommerce\PluginFramework\v5_11_10\Settings_API\Setting::set_id() + * Tests \SkyVerge\WooCommerce\PluginFramework\v5_11_11\Settings_API\Setting::set_id() * * @param string $input input ID * @param string $expected expected return ID @@ -53,7 +53,7 @@ public function test_set_id( $input, $expected ) { /** - * Tests \SkyVerge\WooCommerce\PluginFramework\v5_11_10\Settings_API\Setting::set_type() + * Tests \SkyVerge\WooCommerce\PluginFramework\v5_11_11\Settings_API\Setting::set_type() * * @param string $input input type * @param string $expected expected return type @@ -70,7 +70,7 @@ public function test_set_type( $input, $expected ) { /** - * Tests \SkyVerge\WooCommerce\PluginFramework\v5_11_10\Settings_API\Setting::set_name() + * Tests \SkyVerge\WooCommerce\PluginFramework\v5_11_11\Settings_API\Setting::set_name() * * @param string $input input name * @param string $expected expected return name @@ -87,7 +87,7 @@ public function test_set_name( $input, $expected ) { /** - * Tests \SkyVerge\WooCommerce\PluginFramework\v5_11_10\Settings_API\Setting::set_description() + * Tests \SkyVerge\WooCommerce\PluginFramework\v5_11_11\Settings_API\Setting::set_description() * * @param string $input input description * @param string $expected expected return description @@ -104,7 +104,7 @@ public function test_set_description( $input, $expected ) { /** - * Tests \SkyVerge\WooCommerce\PluginFramework\v5_11_10\Settings_API\Setting::set_is_multi() + * Tests \SkyVerge\WooCommerce\PluginFramework\v5_11_11\Settings_API\Setting::set_is_multi() * * @param bool $input input value * @param bool $expected expected return value @@ -121,7 +121,7 @@ public function test_set_is_multi( $input, $expected ) { /** - * Tests \SkyVerge\WooCommerce\PluginFramework\v5_11_10\Settings_API\Setting::set_options() + * Tests \SkyVerge\WooCommerce\PluginFramework\v5_11_11\Settings_API\Setting::set_options() * * @param array $input input options * @param array $expected expected return options @@ -138,7 +138,7 @@ public function test_set_options( $input, $expected ) { /** - * Tests \SkyVerge\WooCommerce\PluginFramework\v5_11_10\Settings_API\Setting::set_default() + * Tests \SkyVerge\WooCommerce\PluginFramework\v5_11_11\Settings_API\Setting::set_default() * * @param int|float|string|bool|array $input input default value * @param int|float|string|bool|array $expected expected return default value @@ -155,7 +155,7 @@ public function test_set_default( $input, $expected ) { /** - * Tests \SkyVerge\WooCommerce\PluginFramework\v5_11_10\Settings_API\Setting::set_value() + * Tests \SkyVerge\WooCommerce\PluginFramework\v5_11_11\Settings_API\Setting::set_value() * * @param int|float|string|bool|array $input input value * @param int|float|string|bool|array $expected expected return value @@ -172,7 +172,7 @@ public function test_set_value( $input, $expected ) { /** - * Tests \SkyVerge\WooCommerce\PluginFramework\v5_11_10\Settings_API\Setting::set_control() + * Tests \SkyVerge\WooCommerce\PluginFramework\v5_11_11\Settings_API\Setting::set_control() * * @param Control $input input control * @param Control $expected expected return control diff --git a/woocommerce-framework-plugin-loader-sample.php b/woocommerce-framework-plugin-loader-sample.php index 3f253a88f..3d70d8de3 100644 --- a/woocommerce-framework-plugin-loader-sample.php +++ b/woocommerce-framework-plugin-loader-sample.php @@ -60,7 +60,7 @@ class SV_WC_Framework_Plugin_Loader { const MINIMUM_WC_VERSION = '3.9'; /** SkyVerge plugin framework version used by this plugin */ - const FRAMEWORK_VERSION = '5.11.10'; // TODO: framework version + const FRAMEWORK_VERSION = '5.11.11'; // TODO: framework version /** the plugin name, for displaying notices */ diff --git a/woocommerce/Addresses/Address.php b/woocommerce/Addresses/Address.php index d105a3f59..f571e56e8 100644 --- a/woocommerce/Addresses/Address.php +++ b/woocommerce/Addresses/Address.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10\Addresses; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11\Addresses; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\Addresses\\Address' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\Addresses\\Address' ) ) : /** diff --git a/woocommerce/Addresses/Customer_Address.php b/woocommerce/Addresses/Customer_Address.php index cfb145925..75c7215bd 100644 --- a/woocommerce/Addresses/Customer_Address.php +++ b/woocommerce/Addresses/Customer_Address.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10\Addresses; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11\Addresses; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\Addresses\\Customer_Address' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\Addresses\\Customer_Address' ) ) : /** diff --git a/woocommerce/Blocks/Blocks_Handler.php b/woocommerce/Blocks/Blocks_Handler.php new file mode 100644 index 000000000..155476c3f --- /dev/null +++ b/woocommerce/Blocks/Blocks_Handler.php @@ -0,0 +1,187 @@ +plugin = $plugin; + + // blocks-related notices and call-to-actions + add_action( 'admin_notices', [ $this, 'add_admin_notices' ] ); + } + + + /** + * Determines if the plugin is compatible with the WooCommerce Cart block. + * + * @since 5.11.11 + * + * @return bool + */ + public function is_cart_block_compatible() : bool { + + $supports = $this->plugin->get_supported_features(); + + return isset( $supports['blocks']['cart'] ) && true === $supports['blocks']['cart']; + } + + + /** + * Determines if the plugin is compatible with the WooCommerce Checkout block. + * + * @since 5.11.11 + * + * @return bool + */ + public function is_checkout_block_compatible() : bool { + + $supports = $this->plugin->get_supported_features(); + + return isset( $supports['blocks']['checkout'] ) && true === $supports['blocks']['checkout']; + } + + + /** + * Determines if the checkout page is using the checkout block. + * + * @since 5.11.11 + * + * @return bool false when using the legacy checkout shortcode + */ + public static function is_checkout_block_in_use() : bool { + + if ( ! class_exists( CartCheckoutUtils::class ) ) { + return false; + } + + return CartCheckoutUtils::is_checkout_block_default(); + } + + + /** + * Determines if the cart page is using the cart block. + * + * @since 5.11.11 + * + * @return bool false if using the legacy cart shortcode + */ + public static function is_cart_block_in_use() : bool + { + if ( ! class_exists( CartCheckoutUtils::class ) ) { + return false; + } + + return CartCheckoutUtils::is_cart_block_default(); + } + + + /** + * Adds admin notices pertaining the blocks integration. + * + * @since 5.11.11 + * + * @internal + * + * @return void + */ + public function add_admin_notices() : void { + + $admin_notice_handler = $this->plugin->get_admin_notice_handler(); + + if ( static::is_checkout_block_in_use() ) { + + if ( ! $this->is_checkout_block_compatible() ) { + + $url = get_edit_post_link( wc_get_page_id( 'checkout' ) ); + $cta = '' . _x( 'Edit the Checkout Page', 'Button label', 'woocommerce-plugin-framework' ) . ''; + + $admin_notice_handler->add_admin_notice( + sprintf( + /* translators: Context: WordPress blocks and shortcodes. Placeholders: %1$s - Plugin name, %2$s - opening HTML tag, %3$s - closing HTML tag, %4$s - opening HTML tag, %5$s - `[woocommerce_checkout]` shortcode tag, %6$s - closing HTML tag */ + __( '%1$s is not yet compatible with the Checkout block. We recommend %2$sfollowing this guide%3$s to revert to the %4$s%5$s shortcode%6$s.', 'woocommerce-plugin-framework' ), + '' . $this->plugin->get_plugin_name() . '', + '', + '', + '', + '[woocommerce_checkout]', + '', + ) . '

' . $cta, + sprintf( '%s-checkout-block-not-compatible', $this->plugin->get_id_dasherized() ), + [ + 'notice_class' => 'notice-error', + 'always_show_on_settings' => false, + ] + ); + + } else { + + $admin_notice_handler->dismiss_notice( sprintf( '%s-checkout-block-not-compatible', $this->plugin->get_id_dasherized() ), ); + } + } + + if ( static::is_cart_block_in_use() ) { + + if ( ! $this->is_cart_block_compatible() ) { + + $url = get_edit_post_link( wc_get_page_id( 'cart' ) ); + $cta = '' . _x( 'Edit the Cart Page', 'Button label', 'woocommerce-plugin-framework' ) . ''; + + $admin_notice_handler->add_admin_notice( + sprintf( + /* translators: Context: WordPress blocks and shortcodes. Placeholders: %1$s - Plugin name, %2$s - opening HTML tag, %3$s - closing HTML tag, %4$s - opening HTML tag, %5$s - `[woocommerce_cart]` shortcode tag, %6$s - closing HTML tag */ + __( '%1$s is not yet compatible with the Cart block. We recommend %2$sfollowing this guide%3$s to revert to the %4$s%5$s shortcode%6$s.', 'woocommerce-plugin-framework' ), + '' . $this->plugin->get_plugin_name() . '', + '', + '', + '', + '[woocommerce_cart]', + '', + ) . '

' . $cta, + sprintf( '%s-cart-block-not-compatible', $this->plugin->get_id_dasherized() ), + [ + 'notice_class' => 'notice-error', + 'always_show_on_settings' => false, + ] + ); + + } else { + + $admin_notice_handler->dismiss_notice( sprintf( '%s-cart-block-not-compatible', $this->plugin->get_id_dasherized() ) ); + } + } + } + + +} + +endif; diff --git a/woocommerce/Country_Helper.php b/woocommerce/Country_Helper.php index 2ef52b55d..f51d26582 100644 --- a/woocommerce/Country_Helper.php +++ b/woocommerce/Country_Helper.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\Country_Helper' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\Country_Helper' ) ) : /** diff --git a/woocommerce/Handlers/Script_Handler.php b/woocommerce/Handlers/Script_Handler.php index 9fa3e8746..93118b14c 100644 --- a/woocommerce/Handlers/Script_Handler.php +++ b/woocommerce/Handlers/Script_Handler.php @@ -22,14 +22,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10\Handlers; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11\Handlers; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\SV_WC_Helper; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\SV_WC_Plugin_Exception; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\SV_WC_Helper; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\SV_WC_Plugin_Exception; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\Handlers\\Script_Handler' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\Handlers\\Script_Handler' ) ) : /** @@ -79,7 +79,7 @@ protected function add_hooks() { */ protected function get_js_handler_class_name() { - return sprintf( '%s_v5_11_10', $this->js_handler_base_class_name ); + return sprintf( '%s_v5_11_11', $this->js_handler_base_class_name ); } diff --git a/woocommerce/Lifecycle.php b/woocommerce/Lifecycle.php index cf6f56c54..f7f1776a4 100644 --- a/woocommerce/Lifecycle.php +++ b/woocommerce/Lifecycle.php @@ -22,16 +22,16 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10\Plugin; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11\Plugin; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\Admin\Notes_Helper; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\SV_WC_Payment_Gateway_Plugin; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\SV_WC_Plugin; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\SV_WC_Plugin_Compatibility; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\Admin\Notes_Helper; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\SV_WC_Payment_Gateway_Plugin; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\SV_WC_Plugin; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\SV_WC_Plugin_Compatibility; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\Plugin\\Lifecycle' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\Plugin\\Lifecycle' ) ) : /** diff --git a/woocommerce/Settings_API/Abstract_Settings.php b/woocommerce/Settings_API/Abstract_Settings.php index 00a5dd8de..5b8f25f91 100644 --- a/woocommerce/Settings_API/Abstract_Settings.php +++ b/woocommerce/Settings_API/Abstract_Settings.php @@ -22,13 +22,13 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10\Settings_API; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11\Settings_API; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10 as Framework; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11 as Framework; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\Settings_API\\Abstract_Settings' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\Settings_API\\Abstract_Settings' ) ) : /** diff --git a/woocommerce/Settings_API/Control.php b/woocommerce/Settings_API/Control.php index 275e27c4c..e94a7fe09 100644 --- a/woocommerce/Settings_API/Control.php +++ b/woocommerce/Settings_API/Control.php @@ -22,13 +22,13 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10\Settings_API; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11\Settings_API; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10 as Framework; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11 as Framework; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\Settings_API\\Control' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\Settings_API\\Control' ) ) : /** diff --git a/woocommerce/Settings_API/Setting.php b/woocommerce/Settings_API/Setting.php index 9cbda1fdf..3f15d0fac 100644 --- a/woocommerce/Settings_API/Setting.php +++ b/woocommerce/Settings_API/Setting.php @@ -22,13 +22,13 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10\Settings_API; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11\Settings_API; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10 as Framework; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11 as Framework; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\Settings_API\\Setting' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\Settings_API\\Setting' ) ) : /** diff --git a/woocommerce/admin/Notes_Helper.php b/woocommerce/admin/Notes_Helper.php index e808cc65d..909ac756a 100644 --- a/woocommerce/admin/Notes_Helper.php +++ b/woocommerce/admin/Notes_Helper.php @@ -21,13 +21,13 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10\Admin; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11\Admin; use Automattic\WooCommerce\Admin\Notes as WooCommerce_Admin_Notes; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\Admin\\Notes_Helper' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\Admin\\Notes_Helper' ) ) : /** diff --git a/woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php b/woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php index e2bac3c6f..1c047d86a 100644 --- a/woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php +++ b/woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php @@ -21,13 +21,13 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10\Admin; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11\Admin; defined( 'ABSPATH' ) or exit; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10 as Framework; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11 as Framework; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\Admin\\Setup_Wizard' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\Admin\\Setup_Wizard' ) ) : /** diff --git a/woocommerce/api/Abstract_Cacheable_API_Base.php b/woocommerce/api/Abstract_Cacheable_API_Base.php index e79536d98..6ecf9b40b 100644 --- a/woocommerce/api/Abstract_Cacheable_API_Base.php +++ b/woocommerce/api/Abstract_Cacheable_API_Base.php @@ -22,14 +22,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10\API; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11\API; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\SV_WC_API_Base; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\API\Traits\Cacheable_Request_Trait; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\SV_WC_API_Base; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\API\Traits\Cacheable_Request_Trait; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\API\\Abstract_Cacheable_API_Base' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\API\\Abstract_Cacheable_API_Base' ) ) : /** diff --git a/woocommerce/api/abstract-sv-wc-api-json-request.php b/woocommerce/api/abstract-sv-wc-api-json-request.php index 391df1590..2e2ba5081 100644 --- a/woocommerce/api/abstract-sv-wc-api-json-request.php +++ b/woocommerce/api/abstract-sv-wc-api-json-request.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_API_JSON_Request' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_API_JSON_Request' ) ) : /** diff --git a/woocommerce/api/abstract-sv-wc-api-json-response.php b/woocommerce/api/abstract-sv-wc-api-json-response.php index 4f7fced80..f6a692f1f 100644 --- a/woocommerce/api/abstract-sv-wc-api-json-response.php +++ b/woocommerce/api/abstract-sv-wc-api-json-response.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_API_JSON_Response' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_API_JSON_Response' ) ) : /** diff --git a/woocommerce/api/abstract-sv-wc-api-xml-request.php b/woocommerce/api/abstract-sv-wc-api-xml-request.php index c699416f9..1e8652754 100644 --- a/woocommerce/api/abstract-sv-wc-api-xml-request.php +++ b/woocommerce/api/abstract-sv-wc-api-xml-request.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_API_XML_Request' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_API_XML_Request' ) ) : /** diff --git a/woocommerce/api/abstract-sv-wc-api-xml-response.php b/woocommerce/api/abstract-sv-wc-api-xml-response.php index 065dbc3d2..29215abe6 100644 --- a/woocommerce/api/abstract-sv-wc-api-xml-response.php +++ b/woocommerce/api/abstract-sv-wc-api-xml-response.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_API_XML_Response' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_API_XML_Response' ) ) : /** diff --git a/woocommerce/api/class-sv-wc-api-base.php b/woocommerce/api/class-sv-wc-api-base.php index e6bdc270c..1f9ed4bf6 100644 --- a/woocommerce/api/class-sv-wc-api-base.php +++ b/woocommerce/api/class-sv-wc-api-base.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_API_Base' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_API_Base' ) ) : /** diff --git a/woocommerce/api/class-sv-wc-api-exception.php b/woocommerce/api/class-sv-wc-api-exception.php index d53387944..46e0014b3 100644 --- a/woocommerce/api/class-sv-wc-api-exception.php +++ b/woocommerce/api/class-sv-wc-api-exception.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_API_Exception' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_API_Exception' ) ) : /** diff --git a/woocommerce/api/interface-sv-wc-api-request.php b/woocommerce/api/interface-sv-wc-api-request.php index 29d666d8e..01bc55536 100644 --- a/woocommerce/api/interface-sv-wc-api-request.php +++ b/woocommerce/api/interface-sv-wc-api-request.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_API_Request' ) ) : +if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_API_Request' ) ) : /** diff --git a/woocommerce/api/interface-sv-wc-api-response.php b/woocommerce/api/interface-sv-wc-api-response.php index b0afebe47..28fa736c5 100644 --- a/woocommerce/api/interface-sv-wc-api-response.php +++ b/woocommerce/api/interface-sv-wc-api-response.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_API_Response' ) ) : +if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_API_Response' ) ) : /** diff --git a/woocommerce/api/traits/Cacheable_Request_Trait.php b/woocommerce/api/traits/Cacheable_Request_Trait.php index bb8ef89d5..423646054 100644 --- a/woocommerce/api/traits/Cacheable_Request_Trait.php +++ b/woocommerce/api/traits/Cacheable_Request_Trait.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10\API\Traits; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11\API\Traits; defined( 'ABSPATH' ) or exit; -if ( ! trait_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\API\\Traits\\Cacheable_Request_Trait' ) ) : +if ( ! trait_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\API\\Traits\\Cacheable_Request_Trait' ) ) : /** diff --git a/woocommerce/changelog.txt b/woocommerce/changelog.txt index d58fd21fd..827345fe0 100644 --- a/woocommerce/changelog.txt +++ b/woocommerce/changelog.txt @@ -1,5 +1,11 @@ *** SkyVerge WooCommerce Plugin Framework Changelog *** +2023.11.15 - version 5.11.11 + * Fix - Replace deprecated `wcs_renewal_order_meta` filter usage with `wc_subscriptions_renewal_order_data` + * Dev - Replace `supports_hpos` with a `supported_features` key in the main plugin file constructor arguments + * Dev - Introduce a `Blocks_Handler` class which will be expanded in a future release for adding WooCommerce Cart & Checkout Blocks compatibility + * Misc - Warn merchants when a plugin is not compatible with Cart or Checkout blocks to prompt switching to legacy shortcodes + 2023.10.13 - version 5.11.10 * Tweak - Improve tokenization support for gateways that tokenize payment methods with sale * Fix - Update deprecated JS event handlers that would have triggered deprecation notices in console diff --git a/woocommerce/class-sv-wc-admin-notice-handler.php b/woocommerce/class-sv-wc-admin-notice-handler.php index 5a057b5d8..b5780ae6d 100644 --- a/woocommerce/class-sv-wc-admin-notice-handler.php +++ b/woocommerce/class-sv-wc-admin-notice-handler.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Admin_Notice_Handler' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Admin_Notice_Handler' ) ) : /** diff --git a/woocommerce/class-sv-wc-helper.php b/woocommerce/class-sv-wc-helper.php index 3e53b75f7..451883e42 100644 --- a/woocommerce/class-sv-wc-helper.php +++ b/woocommerce/class-sv-wc-helper.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Helper' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Helper' ) ) : /** diff --git a/woocommerce/class-sv-wc-hook-deprecator.php b/woocommerce/class-sv-wc-hook-deprecator.php index b6f51e76f..eaad10896 100644 --- a/woocommerce/class-sv-wc-hook-deprecator.php +++ b/woocommerce/class-sv-wc-hook-deprecator.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Hook_Deprecator' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Hook_Deprecator' ) ) : /** diff --git a/woocommerce/class-sv-wc-plugin-compatibility.php b/woocommerce/class-sv-wc-plugin-compatibility.php index be9135d6b..ff7aecd04 100644 --- a/woocommerce/class-sv-wc-plugin-compatibility.php +++ b/woocommerce/class-sv-wc-plugin-compatibility.php @@ -22,13 +22,13 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; use Automattic\WooCommerce\Utilities\OrderUtil; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Plugin_Compatibility' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Plugin_Compatibility' ) ) : /** diff --git a/woocommerce/class-sv-wc-plugin-dependencies.php b/woocommerce/class-sv-wc-plugin-dependencies.php index 6a3b6c4c8..3b10fb4ff 100644 --- a/woocommerce/class-sv-wc-plugin-dependencies.php +++ b/woocommerce/class-sv-wc-plugin-dependencies.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Plugin_Dependencies' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Plugin_Dependencies' ) ) : /** diff --git a/woocommerce/class-sv-wc-plugin-exception.php b/woocommerce/class-sv-wc-plugin-exception.php index 3b1ca18eb..7b3209ad3 100644 --- a/woocommerce/class-sv-wc-plugin-exception.php +++ b/woocommerce/class-sv-wc-plugin-exception.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Plugin_Exception' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Plugin_Exception' ) ) : /** diff --git a/woocommerce/class-sv-wc-plugin.php b/woocommerce/class-sv-wc-plugin.php index 53a4b9722..8000c9749 100644 --- a/woocommerce/class-sv-wc-plugin.php +++ b/woocommerce/class-sv-wc-plugin.php @@ -22,11 +22,13 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; + +use Automattic\WooCommerce\Utilities\FeaturesUtil; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Plugin' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Plugin' ) ) : /** @@ -43,7 +45,7 @@ abstract class SV_WC_Plugin { /** Plugin Framework Version */ - const VERSION = '5.11.10'; + const VERSION = '5.11.11'; /** @var object single instance of plugin */ protected static $instance; @@ -63,9 +65,6 @@ abstract class SV_WC_Plugin { /** @var string template path, without trailing slash */ private $template_path; - /** @var bool whether the plugin supports WooCommerce HPOS */ - private $supports_hpos; - /** @var \WC_Logger instance */ private $logger; @@ -75,6 +74,9 @@ abstract class SV_WC_Plugin { /** @var string the plugin text domain */ private $text_domain; + /** @var array{ hpos?: bool, blocks?: array{ cart?: bool, checkout?: bool }} plugin compatibility flags */ + private $supported_features; + /** @var array memoized list of active plugins */ private $active_plugins = []; @@ -90,6 +92,9 @@ abstract class SV_WC_Plugin { /** @var REST_API REST API handler instance */ protected $rest_api_handler; + /** @var Blocks\Blocks_Handler blocks handler instance */ + protected Blocks\Blocks_Handler $blocks_handler; + /** @var Admin\Setup_Wizard handler instance */ protected $setup_wizard_handler; @@ -106,35 +111,43 @@ abstract class SV_WC_Plugin { * * @param string $id plugin id * @param string $version plugin version number - * @param array $args { - * optional plugin arguments - * - * @type int|float $latest_wc_versions the last supported versions of WooCommerce, as a major.minor float relative to the latest available version - * @type string $text_domain the plugin textdomain, used to set up translations - * @type bool $supports_hpos whether the plugin supports HPOS (default false) - * @type array $dependencies { - * PHP extension, function, and settings dependencies - * - * @type array $php_extensions PHP extension dependencies - * @type array $php_functions PHP function dependencies - * @type array $php_settings PHP settings dependencies + * @param array{ + * latest_wc_versions?: int|float, + * text_domain?: string, + * supported_features?: array{ + * hpos?: bool, + * blocks?: array{ + * cart?: bool, + * checkout?: bool + * } + * }, + * dependencies?: array{ + * php_extensions?: array, + * php_functions?: array, + * php_settings?: array * } - * } + * } $args */ - public function __construct( $id, $version, $args = [] ) { + public function __construct( string $id, string $version, array $args = [] ) { // required params $this->id = $id; $this->version = $version; $args = wp_parse_args( $args, [ - 'text_domain' => '', - 'supports_hpos' => false, - 'dependencies' => [], + 'text_domain' => '', + 'dependencies' => [], + 'supported_features' => [ + 'hpos' => false, + 'blocks' => [ + 'cart' => false, + 'checkout' => false, + ], + ], ] ); - $this->text_domain = $args['text_domain']; - $this->supports_hpos = $args['supports_hpos']; + $this->text_domain = $args['text_domain']; + $this->supported_features = $args['supported_features']; // includes that are required to be available at all times $this->includes(); @@ -157,6 +170,9 @@ public function __construct( $id, $version, $args = [] ) { // build the REST API handler instance $this->init_rest_api_handler(); + // build the blocks handler instance + $this->init_blocks_handler(); + // build the setup handler instance $this->init_setup_wizard_handler(); @@ -253,6 +269,22 @@ protected function init_rest_api_handler() { } + /** + * Builds the blocks handler instance. + * + * @since 5.11.11 + * + * @return void + */ + protected function init_blocks_handler() : void { + + require_once( $this->get_framework_path() . '/Blocks/Blocks_Handler.php' ); + + // individual plugins should initialize their block integrations handler by overriding this method + $this->blocks_handler = new Blocks\Blocks_Handler( $this ); + } + + /** * Builds the Setup Wizard handler instance. * @@ -282,8 +314,8 @@ private function add_hooks() { // hook for translations separately to ensure they're loaded add_action( 'init', array( $this, 'load_translations' ) ); - // handle HPOS compatibility - add_action( 'before_woocommerce_init', [ $this, 'handle_hpos_compatibility' ] ); + // handle WooCommerce features compatibility (such as HPOS, WC Cart & Checkout Blocks support...) + add_action( 'before_woocommerce_init', [ $this, 'handle_features_compatibility' ] ); // add the admin notices add_action( 'admin_notices', array( $this, 'add_admin_notices' ) ); @@ -613,14 +645,34 @@ public function plugin_action_links( $actions ) { * Declares HPOS compatibility if the plugin is compatible with HPOS. * * @internal + * @deprecated since 5.11.11 + * @see SV_WC_Plugin::handle_features_compatibility() * * @since 5.11.0 */ public function handle_hpos_compatibility() { - if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) { - \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', $this->get_plugin_file(), $this->is_hpos_compatible() ); + wc_deprecated_function( 'SV_WC_Plugin::handle_hpos_compatibility', '5.11.11', 'SV_WC_Plugin::handle_features_compatibility' ); + + $this->handle_features_compatibility(); + } + + + /** + * Declares compatibility with specific WooCommerce features. + * + * @internal + * + * @since 5.11.11 + */ + public function handle_features_compatibility() : void { + + if ( ! class_exists( FeaturesUtil::class ) ) { + return; } + + FeaturesUtil::declare_compatibility( 'custom_order_tables', $this->get_plugin_file(), $this->is_hpos_compatible() ); + FeaturesUtil::declare_compatibility( 'cart_checkout_blocks', $this->get_plugin_file(), $this->get_blocks_handler()->is_cart_block_compatible() && $this->get_blocks_handler()->is_checkout_block_compatible() ); } @@ -813,6 +865,19 @@ public function is_tls_1_2_available() { } + /** + * Gets a list of the plugin's compatibility flags. + * + * @since 5.11.11 + * + * @return array{ hpos?: bool, blocks?: array{ cart?: bool, checkout?: bool }} + */ + public function get_supported_features() : array { + + return $this->supported_features ?? []; + } + + /** * Determines whether the plugin supports HPOS. * @@ -820,9 +885,11 @@ public function is_tls_1_2_available() { * * @return bool */ - public function is_hpos_compatible() : bool - { - return $this->supports_hpos && SV_WC_Plugin_Compatibility::is_wc_version_gte('7.6'); + public function is_hpos_compatible() : bool { + + return isset($this->supported_features['hpos'] ) + && true === $this->supported_features['hpos'] + && SV_WC_Plugin_Compatibility::is_wc_version_gte( '7.6' ); } @@ -917,6 +984,19 @@ public function get_lifecycle_handler() { } + /** + * Gets the blocks handler instance. + * + * @since 5.11.11 + * + * @return Blocks\Blocks_Handler + */ + public function get_blocks_handler() : Blocks\Blocks_Handler { + + return $this->blocks_handler; + } + + /** * Gets the Setup Wizard handler instance. * @@ -1286,7 +1366,7 @@ public function is_plugin_active( $plugin_name ) { if ( SV_WC_Helper::str_exists( $plugin, '/' ) ) { // normal plugin name (plugin-dir/plugin-filename.php) - list( , $filename ) = explode( '/', $plugin ); + [ , $filename ] = explode( '/', $plugin ); } else { diff --git a/woocommerce/class-sv-wp-admin-message-handler.php b/woocommerce/class-sv-wp-admin-message-handler.php index 6a6dfa402..d2f561eee 100644 --- a/woocommerce/class-sv-wp-admin-message-handler.php +++ b/woocommerce/class-sv-wp-admin-message-handler.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WP_Admin_Message_Handler' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WP_Admin_Message_Handler' ) ) : /** diff --git a/woocommerce/compatibility/abstract-sv-wc-data-compatibility.php b/woocommerce/compatibility/abstract-sv-wc-data-compatibility.php index cc0d677be..68ad938bc 100644 --- a/woocommerce/compatibility/abstract-sv-wc-data-compatibility.php +++ b/woocommerce/compatibility/abstract-sv-wc-data-compatibility.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Data_Compatibility' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Data_Compatibility' ) ) : /** diff --git a/woocommerce/compatibility/class-sv-wc-order-compatibility.php b/woocommerce/compatibility/class-sv-wc-order-compatibility.php index 0dfc493a2..02ffbe3db 100644 --- a/woocommerce/compatibility/class-sv-wc-order-compatibility.php +++ b/woocommerce/compatibility/class-sv-wc-order-compatibility.php @@ -22,7 +22,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; use Automattic\WooCommerce\Admin\Overrides\Order; use Automattic\WooCommerce\Internal\Admin\Orders\PageController; @@ -32,7 +32,7 @@ defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Order_Compatibility' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Order_Compatibility' ) ) : /** diff --git a/woocommerce/compatibility/class-sv-wc-subscription-compatibility.php b/woocommerce/compatibility/class-sv-wc-subscription-compatibility.php index 4f9107ad9..1f6e99370 100644 --- a/woocommerce/compatibility/class-sv-wc-subscription-compatibility.php +++ b/woocommerce/compatibility/class-sv-wc-subscription-compatibility.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Subscription_Compatibility' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Subscription_Compatibility' ) ) : /** * WooCommerce subscription compatibility class. diff --git a/woocommerce/i18n/languages/woocommerce-plugin-framework.pot b/woocommerce/i18n/languages/woocommerce-plugin-framework.pot index 1382753c2..fd639207d 100644 --- a/woocommerce/i18n/languages/woocommerce-plugin-framework.pot +++ b/woocommerce/i18n/languages/woocommerce-plugin-framework.pot @@ -1,2005 +1,2004 @@ -# Copyright (c) GoDaddy Operating Company, LLC. All Rights Reserved. msgid "" msgstr "" -"Project-Id-Version: SkyVerge WooCommerce Plugin Framework 1.0.0 TODO: plugin version\n" -"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wc-plugin-framework\n" -"Last-Translator: plugins@godaddy.com\n" +"Project-Id-Version: SkyVerge WooCommerce Plugin Framework\n" +"Report-Msgid-Bugs-To: \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: 2023-10-13T06:43:26+00:00\n" +"POT-Creation-Date: 2023-11-15T09:59:39+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"X-Generator: WP-CLI 2.8.1\n" +"X-Generator: WP-CLI 2.7.1\n" "X-Domain: woocommerce-plugin-framework\n" -#. Plugin Name of the plugin -msgid "WooCommerce Framework Plugin TODO: plugin name" -msgstr "" - -#. Plugin URI of the plugin -msgid "http://www.woocommerce.com/products/ TODO: product URL" -msgstr "" - -#. Description of the plugin -msgid "TODO: plugin description" -msgstr "" - -#. Author of the plugin -msgid "SkyVerge" -msgstr "" - -#. Author URI of the plugin -msgid "http://www.woocommerce.com" -msgstr "" - -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:182 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:182 msgid "Thanks for installing %1$s! To get started, take a minute to %2$sread the documentation%3$s :)" msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:210 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:210 msgid "Thanks for installing %1$s! To get started, take a minute to complete these %2$squick and easy setup steps%3$s :)" msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:235 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:235 msgid "Setup" msgstr "" #. translators: Placeholders: %s - plugin name -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:303 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:303 msgid "%s › Setup" msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:350 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:350 msgid "Oops! An error occurred, please try again." msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:395 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:395 msgctxt "enhanced select" msgid "No matches found" msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:396 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:396 msgctxt "enhanced select" msgid "Loading failed" msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:397 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:397 msgctxt "enhanced select" msgid "Please enter 1 or more characters" msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:398 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:398 msgctxt "enhanced select" msgid "Please enter %qty% or more characters" msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:399 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:399 msgctxt "enhanced select" msgid "Please delete 1 character" msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:400 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:400 msgctxt "enhanced select" msgid "Please delete %qty% characters" msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:401 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:401 msgctxt "enhanced select" msgid "You can only select 1 item" msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:402 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:402 msgctxt "enhanced select" msgid "You can only select %qty% items" msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:403 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:403 msgctxt "enhanced select" msgid "Loading more results…" msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:404 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:404 msgctxt "enhanced select" msgid "Searching…" msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:488 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:488 msgid "Ready!" msgstr "" #. translators: Placeholder: %s - plugin name -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:581 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:581 msgid "Welcome to %s!" msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:594 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:594 msgid "This quick setup wizard will help you configure the basic settings and get you started." msgstr "" #. translators: Placeholder: %s - the plugin name -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:613 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:613 msgid "%s is ready!" msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:670 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:670 msgid "Next step" msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:696 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:696 msgid "You can also:" msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:740 -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:770 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:740 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:770 msgid "View the Docs" msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:741 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:741 msgid "See more setup options" msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:742 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:742 msgid "Learn more about customizing the plugin" msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:766 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:766 msgid "Review Your Settings" msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:774 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:774 msgid "Leave a Review" msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:798 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:798 msgid "Continue" msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:958 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:958 msgid "Return to the WordPress Dashboard" msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:960 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:960 msgid "Not right now" msgstr "" -#: woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php:962 +#: admin/abstract-sv-wc-plugin-admin-setup-wizard.php:962 msgid "Skip this step" msgstr "" -#: woocommerce/class-sv-wc-framework-bootstrap.php:268 +#: Blocks/Blocks_Handler.php:126 +msgctxt "Button label" +msgid "Edit the Checkout Page" +msgstr "" + +#. translators: Context: WordPress blocks and shortcodes. Placeholders: %1$s - Plugin name, %2$s - opening HTML tag, %3$s - closing HTML tag, %4$s - opening HTML tag, %5$s - `[woocommerce_checkout]` shortcode tag, %6$s - closing HTML tag +#: Blocks/Blocks_Handler.php:131 +msgid "%1$s is not yet compatible with the Checkout block. We recommend %2$sfollowing this guide%3$s to revert to the %4$s%5$s shortcode%6$s." +msgstr "" + +#: Blocks/Blocks_Handler.php:157 +msgctxt "Button label" +msgid "Edit the Cart Page" +msgstr "" + +#. translators: Context: WordPress blocks and shortcodes. Placeholders: %1$s - Plugin name, %2$s - opening HTML tag, %3$s - closing HTML tag, %4$s - opening HTML tag, %5$s - `[woocommerce_cart]` shortcode tag, %6$s - closing HTML tag +#: Blocks/Blocks_Handler.php:162 +msgid "%1$s is not yet compatible with the Cart block. We recommend %2$sfollowing this guide%3$s to revert to the %4$s%5$s shortcode%6$s." +msgstr "" + +#: class-sv-wc-framework-bootstrap.php:268 msgid "The following plugin is disabled because it is out of date and incompatible with newer plugins on your site:" msgid_plural "The following plugins are disabled because they are out of date and incompatible with newer plugins on your site:" msgstr[0] "" msgstr[1] "" #. translators: Context is for plugins to activate or deactivate. HTML Placeholders: %1$s - tag, %2$s - tag, %3$s - tag, %4$s - tag, %5$s - tag, %6$s - tag, %7$s - tag, %8$s - tag -#: woocommerce/class-sv-wc-framework-bootstrap.php:282 +#: class-sv-wc-framework-bootstrap.php:282 msgid "To resolve this, please %1$supdate%2$s (recommended) %3$sor%4$s %5$sdeactivate%6$s the above plugin, or %7$sdeactivate the following%8$s:" msgid_plural "To resolve this, please %1$supdate%2$s (recommended) %3$sor%4$s %5$sdeactivate%6$s the above plugins, or %7$sdeactivate the following%8$s:" msgstr[0] "" msgstr[1] "" -#: woocommerce/class-sv-wc-framework-bootstrap.php:303 +#: class-sv-wc-framework-bootstrap.php:303 msgid "The following plugins are inactive because they require a newer version of WooCommerce:" msgstr "" -#: woocommerce/class-sv-wc-framework-bootstrap.php:303 +#: class-sv-wc-framework-bootstrap.php:303 msgid "The following plugin is inactive because it requires a newer version of WooCommerce:" msgstr "" #. translators: Placeholders: %1$s - plugin name, %2$s - WooCommerce version number -#: woocommerce/class-sv-wc-framework-bootstrap.php:308 +#: class-sv-wc-framework-bootstrap.php:308 msgid "%1$s requires WooCommerce %2$s or newer" msgstr "" #. translators: Placeholders: %1$s - tag, %2$s - tag -#: woocommerce/class-sv-wc-framework-bootstrap.php:312 +#: class-sv-wc-framework-bootstrap.php:312 msgid "Please %1$supdate WooCommerce%2$s" msgstr "" -#: woocommerce/class-sv-wc-helper.php:427 +#: class-sv-wc-helper.php:427 msgctxt "coordinating conjunction for a list of items: a, b, and c" msgid "and" msgstr "" #. translators: A list of items, for example: "US or Canada", or "US, Canada, or Mexico". English uses Oxford comma before the conjunction ("or") if there are at least 2 items preceding it - hence the use of plural forms. If your locale does not use Oxford comma, you can just provide the same translation to all plural forms. Placeholders: %1$s - a comma-separated list of item, %2$s - the final item in the list -#: woocommerce/class-sv-wc-helper.php:472 +#: class-sv-wc-helper.php:472 msgid "%1$s or %2$s" msgid_plural "%1$s, or %2$s" msgstr[0] "" msgstr[1] "" #. translators: A list of items, for example: "US and Canada", or "US, Canada, and Mexico". English uses Oxford comma before the conjunction ("and") if there are at least 2 items preceding it - hence the use of plural forms. If your locale does not use Oxford comma, you can just provide the same translation to all plural forms. Placeholders: %1$s - a comma-separated list of items, %2$s - the final item in the list -#: woocommerce/class-sv-wc-helper.php:478 +#: class-sv-wc-helper.php:478 msgid "%1$s and %2$s" msgid_plural "%1$s, and %2$s" msgstr[0] "" msgstr[1] "" #. translators: Placeholders: %1$s - plugin name, %2$s - a PHP extension/comma-separated list of PHP extensions -#: woocommerce/class-sv-wc-plugin-dependencies.php:156 +#: class-sv-wc-plugin-dependencies.php:156 msgid "%1$s requires the %2$s PHP extension to function. Contact your host or server administrator to install and configure the missing extension." msgid_plural "%1$s requires the following PHP extensions to function: %2$s. Contact your host or server administrator to install and configure the missing extensions." msgstr[0] "" msgstr[1] "" #. translators: Placeholders: %1$s - plugin name, %2$s - a PHP function/comma-separated list of PHP functions -#: woocommerce/class-sv-wc-plugin-dependencies.php:184 +#: class-sv-wc-plugin-dependencies.php:184 msgid "%1$s requires the %2$s PHP function to exist. Contact your host or server administrator to install and configure the missing function." msgid_plural "%1$s requires the following PHP functions to exist: %2$s. Contact your host or server administrator to install and configure the missing functions." msgstr[0] "" msgstr[1] "" #. translators: Placeholder: %s - a PHP setting value -#: woocommerce/class-sv-wc-plugin-dependencies.php:228 +#: class-sv-wc-plugin-dependencies.php:228 msgid "%s or higher" msgstr "" -#: woocommerce/class-sv-wc-plugin-dependencies.php:238 +#: class-sv-wc-plugin-dependencies.php:238 msgid "Please contact your hosting provider or server administrator to configure these settings." msgstr "" #. translators: Placeholders: %1$s - HTML tag, %2$s - HTML tag -#: woocommerce/class-sv-wc-plugin-dependencies.php:261 +#: class-sv-wc-plugin-dependencies.php:261 msgid "Hey there! We've noticed that your server is running %1$san outdated version of PHP%2$s, which is the programming language that WooCommerce and its extensions are built on." msgstr "" #. translators: Placeholders: %1$s - HTML tag, %2$s - HTML tag -#: woocommerce/class-sv-wc-plugin-dependencies.php:263 +#: class-sv-wc-plugin-dependencies.php:263 msgid "The PHP version that is currently used for your site is no longer maintained, nor %1$sreceives security updates%2$s; newer versions are faster and more secure." msgstr "" #. translators: Context: User is running an outdated PHP Version a plugin is not compatible with. Placeholders: %s - the plugin name -#: woocommerce/class-sv-wc-plugin-dependencies.php:265 +#: class-sv-wc-plugin-dependencies.php:265 msgid "As a result, %s no longer supports this version and you should upgrade PHP as soon as possible." msgstr "" #. translators: Context: The host can update PHP version for the user. Placeholders: %1$s - HTML tag, %2$s - HTML tag -#: woocommerce/class-sv-wc-plugin-dependencies.php:267 +#: class-sv-wc-plugin-dependencies.php:267 msgid "Your hosting provider can do this for you. %1$sHere are some resources to help you upgrade%2$s and to explain PHP versions further." msgstr "" #. translators: Placeholders: %s - plugin name -#: woocommerce/class-sv-wc-plugin.php:310 +#: class-sv-wc-plugin.php:342 msgid "You cannot clone instances of %s." msgstr "" #. translators: Placeholders: %s - plugin name -#: woocommerce/class-sv-wc-plugin.php:321 +#: class-sv-wc-plugin.php:353 msgid "You cannot unserialize instances of %s." msgstr "" #. translators: Docs as in Documentation -#: woocommerce/class-sv-wc-plugin.php:594 +#: class-sv-wc-plugin.php:626 msgid "Docs" msgstr "" -#: woocommerce/class-sv-wc-plugin.php:599 +#: class-sv-wc-plugin.php:631 msgctxt "noun" msgid "Support" msgstr "" -#: woocommerce/class-sv-wc-plugin.php:604 +#: class-sv-wc-plugin.php:636 msgctxt "verb" msgid "Review" msgstr "" #. translators: Placeholders: %1$s - PHP setting value, %2$s - version or value required -#: woocommerce/class-sv-wc-plugin.php:710 +#: class-sv-wc-plugin.php:762 msgid "%1$s - A minimum of %2$s is required." msgstr "" #. translators: Context: As in "Value has been set as [foo], but [bar] is required". Placeholders: %1$s - current value for a PHP setting, %2$s - required value for the PHP setting -#: woocommerce/class-sv-wc-plugin.php:720 +#: class-sv-wc-plugin.php:772 msgid "Set as %1$s - %2$s is required." msgstr "" -#: woocommerce/class-sv-wc-plugin.php:1013 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php:870 +#: class-sv-wc-plugin.php:1093 +#: payment-gateway/class-sv-wc-payment-gateway-plugin.php:870 msgid "Configure" msgstr "" -#: woocommerce/Lifecycle.php:394 +#: Lifecycle.php:394 msgctxt "Generic congratulatory exclamation at the start of a milestone message" msgid "Awesome!" msgstr "" -#: woocommerce/Lifecycle.php:395 +#: Lifecycle.php:395 msgctxt "Generic congratulatory exclamation at the start of a milestone message" msgid "Fantastic!" msgstr "" -#: woocommerce/Lifecycle.php:396 +#: Lifecycle.php:396 msgctxt "Generic congratulatory exclamation at the start of a milestone message" msgid "Cowabunga!" msgstr "" -#: woocommerce/Lifecycle.php:397 +#: Lifecycle.php:397 msgctxt "Generic congratulatory exclamation at the start of a milestone message" msgid "Congratulations!" msgstr "" -#: woocommerce/Lifecycle.php:398 +#: Lifecycle.php:398 msgctxt "Generic congratulatory exclamation at the start of a milestone message" msgid "Hot dog!" msgstr "" #. translators: Placeholders: %1$s - Plugin name, %2$s - Opening HTML tag, %3$s - Closing HTML tag, %4$s - Opening HTML tag, %5$s - Closing HTML tag -#: woocommerce/Lifecycle.php:405 +#: Lifecycle.php:405 msgid "Are you having a great experience with %1$s so far? Please consider %2$sleaving a review%3$s! If things aren't going quite as expected, we're happy to help -- please %4$sreach out to our support team%5$s." msgstr "" -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:130 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:130 msgctxt "Payment transaction capture" msgid "Are you sure you wish to process this capture? The action cannot be undone." msgstr "" -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:133 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:133 msgctxt "Payment transaction capture failed error message" msgid "Something went wrong, and the capture could not be completed. Please try again." msgstr "" #. translators: verb, as in "Capture credit card charge". Used when an amount has been pre-authorized before, but funds have not yet been captured (taken) from the card. Capturing the charge will take the money from the credit card and put it in the merchant's pockets. -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:178 -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:267 -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:330 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:178 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:267 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:330 msgid "Capture Charge" msgstr "" -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:320 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:320 msgid "This charge has been fully captured." msgstr "" -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:322 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:322 msgid "This charge can no longer be captured." msgstr "" -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:324 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php:324 msgid "This charge cannot be captured." msgstr "" -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:91 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:91 msgid "Are you sure you want to remove this token?" msgstr "" -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:101 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:101 msgid "Invalid token data" msgstr "" -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:105 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:105 msgid "An error occurred. Please try again." msgstr "" -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:491 -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php:306 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:491 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php:306 msgid "(%s)" msgstr "" -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:521 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:900 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:521 +#: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:900 msgid "Default" msgstr "" -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:557 -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:590 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:557 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:590 msgid "Token ID" msgstr "" -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:562 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-privacy.php:302 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:562 +#: payment-gateway/class-sv-wc-payment-gateway-privacy.php:302 msgid "Card Type" msgstr "" -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:567 -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:603 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-privacy.php:193 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-privacy.php:300 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:567 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:603 +#: payment-gateway/class-sv-wc-payment-gateway-privacy.php:193 +#: payment-gateway/class-sv-wc-payment-gateway-privacy.php:300 msgctxt "Last four digits of a payment method" msgid "Last Four" msgstr "" -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:574 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php:362 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:574 +#: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:362 msgid "Expiration (MM/YY)" msgstr "" #. translators: e-check account type, HTML form field label -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:595 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php:470 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-privacy.php:301 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:595 +#: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:470 +#: payment-gateway/class-sv-wc-payment-gateway-privacy.php:301 msgid "Account Type" msgstr "" -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:598 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:598 msgid "Checking" msgstr "" -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:599 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:599 msgid "Savings" msgstr "" -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:700 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:700 msgid "Refresh" msgstr "" -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:702 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:702 msgid "Add New" msgstr "" -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:705 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:297 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:705 +#: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:297 msgid "Save" msgstr "" -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:728 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php:728 msgid "Remove" msgstr "" #. translators: Placeholder: %s - Plugin name #. translators: Placeholder: %s - Payment gateway title (e.g. Authorize.Net, Braintree, etc.) -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php:225 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-privacy.php:211 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php:225 +#: payment-gateway/class-sv-wc-payment-gateway-privacy.php:211 msgid "%s Payment Tokens" msgstr "" -#: woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php:303 -#: woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:874 +#: payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php:303 +#: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:880 msgid "Customer ID" msgstr "" -#: woocommerce/payment-gateway/admin/views/html-admin-gateway-status.php:32 +#: payment-gateway/admin/views/html-admin-gateway-status.php:32 msgid "This section contains configuration settings for this gateway." msgstr "" #. translators: environment as in a software environment (test/production) -#: woocommerce/payment-gateway/admin/views/html-admin-gateway-status.php:53 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1419 +#: payment-gateway/admin/views/html-admin-gateway-status.php:53 +#: payment-gateway/class-sv-wc-payment-gateway.php:1419 msgid "Environment" msgstr "" -#: woocommerce/payment-gateway/admin/views/html-admin-gateway-status.php:54 +#: payment-gateway/admin/views/html-admin-gateway-status.php:54 msgid "The transaction environment for this gateway." msgstr "" -#: woocommerce/payment-gateway/admin/views/html-admin-gateway-status.php:61 +#: payment-gateway/admin/views/html-admin-gateway-status.php:61 msgid "Tokenization Enabled" msgstr "" -#: woocommerce/payment-gateway/admin/views/html-admin-gateway-status.php:62 +#: payment-gateway/admin/views/html-admin-gateway-status.php:62 msgid "Displays whether or not tokenization is enabled for this gateway." msgstr "" -#: woocommerce/payment-gateway/admin/views/html-admin-gateway-status.php:75 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1346 +#: payment-gateway/admin/views/html-admin-gateway-status.php:75 +#: payment-gateway/class-sv-wc-payment-gateway.php:1346 msgid "Debug Mode" msgstr "" -#: woocommerce/payment-gateway/admin/views/html-admin-gateway-status.php:76 +#: payment-gateway/admin/views/html-admin-gateway-status.php:76 msgid "Displays whether or not debug logging is enabled for this gateway." msgstr "" -#: woocommerce/payment-gateway/admin/views/html-admin-gateway-status.php:79 +#: payment-gateway/admin/views/html-admin-gateway-status.php:79 msgid "Display at Checkout & Log" msgstr "" -#: woocommerce/payment-gateway/admin/views/html-admin-gateway-status.php:81 +#: payment-gateway/admin/views/html-admin-gateway-status.php:81 msgid "Display at Checkout" msgstr "" -#: woocommerce/payment-gateway/admin/views/html-admin-gateway-status.php:83 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1354 +#: payment-gateway/admin/views/html-admin-gateway-status.php:83 +#: payment-gateway/class-sv-wc-payment-gateway.php:1354 msgid "Save to Log" msgstr "" -#: woocommerce/payment-gateway/admin/views/html-admin-gateway-status.php:85 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1352 +#: payment-gateway/admin/views/html-admin-gateway-status.php:85 +#: payment-gateway/class-sv-wc-payment-gateway.php:1352 msgid "Off" msgstr "" -#: woocommerce/payment-gateway/admin/views/html-order-partial-capture.php:30 +#: payment-gateway/admin/views/html-order-partial-capture.php:30 msgctxt "Authorized transaction for order payment" msgid "Authorization total" msgstr "" -#: woocommerce/payment-gateway/admin/views/html-order-partial-capture.php:34 +#: payment-gateway/admin/views/html-order-partial-capture.php:34 msgctxt "Captured transaction (without charge) for order payment" msgid "Amount already captured" msgstr "" -#: woocommerce/payment-gateway/admin/views/html-order-partial-capture.php:40 +#: payment-gateway/admin/views/html-order-partial-capture.php:40 msgid "Remaining order total" msgstr "" -#: woocommerce/payment-gateway/admin/views/html-order-partial-capture.php:46 +#: payment-gateway/admin/views/html-order-partial-capture.php:46 msgctxt "Capture (without charge) amount for order payment" msgid "Capture amount" msgstr "" -#: woocommerce/payment-gateway/admin/views/html-order-partial-capture.php:53 +#: payment-gateway/admin/views/html-order-partial-capture.php:53 msgid "Comment (optional):" msgstr "" #. translators: Context: Capture payment without charge. Placeholder: %s - transaction amount to be captured. -#: woocommerce/payment-gateway/admin/views/html-order-partial-capture.php:67 +#: payment-gateway/admin/views/html-order-partial-capture.php:67 msgid "Capture %s" msgstr "" -#: woocommerce/payment-gateway/admin/views/html-order-partial-capture.php:70 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:608 +#: payment-gateway/admin/views/html-order-partial-capture.php:70 +#: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:608 msgid "Cancel" msgstr "" -#: woocommerce/payment-gateway/admin/views/html-user-payment-token-editor-token.php:57 +#: payment-gateway/admin/views/html-user-payment-token-editor-token.php:57 msgid "-- Select an option --" msgstr "" -#: woocommerce/payment-gateway/admin/views/html-user-payment-token-editor.php:59 +#: payment-gateway/admin/views/html-user-payment-token-editor.php:59 msgid "No saved payment tokens" msgstr "" -#: woocommerce/payment-gateway/admin/views/html-user-profile-field-customer-id.php:30 +#: payment-gateway/admin/views/html-user-profile-field-customer-id.php:30 msgid "The gateway customer ID for the user. Only edit this if necessary." msgstr "" -#: woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:99 -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php:141 -#: woocommerce/payment-gateway/External_Checkout/Google_Pay/Frontend.php:131 +#: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:99 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php:141 +#: payment-gateway/External_Checkout/Google_Pay/Frontend.php:131 msgid "An error occurred, please try again or try an alternate form of payment" msgstr "" -#: woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:100 +#: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:100 msgid "We cannot process your order with the payment information that you provided. Please use a different payment account or an alternate payment method." msgstr "" -#: woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:101 +#: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:101 msgid "This order is being placed on hold for review. Please contact us to complete the transaction." msgstr "" -#: woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:106 +#: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:106 msgctxt "Credit or debit card CSC/CVC/CVV" msgid "This order is being placed on hold for review due to an incorrect card verification number. You may contact the store to complete the transaction." msgstr "" -#: woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:107 +#: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:107 msgctxt "Credit or debit card CSC/CVC/CVV" msgid "The card verification number is invalid, please try again." msgstr "" -#: woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:108 +#: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:108 msgctxt "Credit or debit card CSC/CVC/CVV" msgid "Please enter your card verification number and try again." msgstr "" -#: woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:111 +#: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:111 msgctxt "Credit or debit card" msgid "That card type is not accepted, please use an alternate card or other form of payment." msgstr "" -#: woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:112 -#: woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:116 +#: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:112 +#: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:116 msgctxt "Credit or debit card" msgid "The card type is invalid or does not correlate with the credit card number. Please try again or use an alternate card or other form of payment." msgstr "" -#: woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:113 +#: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:113 msgctxt "Credit or debit card" msgid "Please select the card type and try again." msgstr "" -#: woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:117 +#: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:117 msgctxt "Credit or debit card" msgid "The card number is invalid, please re-enter and try again." msgstr "" -#: woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:118 +#: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:118 msgctxt "Credit or debit card" msgid "Please enter your card number and try again." msgstr "" -#: woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:121 +#: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:121 msgctxt "Credit or debit card (whole date issue)" msgid "The card expiration date is invalid, please re-enter and try again." msgstr "" -#: woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:122 +#: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:122 msgctxt "Credit or debit card" msgid "The card expiration month is invalid, please re-enter and try again." msgstr "" -#: woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:123 +#: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:123 msgctxt "Credit or debit card" msgid "The card expiration year is invalid, please re-enter and try again." msgstr "" -#: woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:124 +#: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:124 msgctxt "Credit or debit card" msgid "Please enter your card expiration date and try again." msgstr "" -#: woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:127 +#: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:127 msgid "The bank routing number is invalid, please re-enter and try again." msgstr "" -#: woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:128 +#: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:128 msgid "The bank account number is invalid, please re-enter and try again." msgstr "" -#: woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:131 +#: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:131 msgctxt "Credit or debit card" msgid "The provided card is expired, please use an alternate card or other form of payment." msgstr "" -#: woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:132 +#: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:132 msgctxt "Credit or debit card" msgid "The provided card was declined, please use an alternate card or other form of payment." msgstr "" -#: woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:133 +#: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:133 msgctxt "Credit or debit card" msgid "Insufficient funds in account, please use an alternate card or other form of payment." msgstr "" -#: woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:134 +#: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:134 msgctxt "Credit or debit card" msgid "The card is inactivate or not authorized for card-not-present transactions, please use an alternate card or other form of payment." msgstr "" -#: woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:135 +#: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:135 msgctxt "Credit or debit card" msgid "The credit limit for the card has been reached, please use an alternate card or other form of payment." msgstr "" -#: woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:136 +#: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:136 msgctxt "Credit or debit card CSC/CVC/CVV" msgid "The card verification number does not match. Please re-enter and try again." msgstr "" -#: woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:137 +#: payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php:137 msgctxt "Credit or debit card" msgid "The provided address does not match the billing address for cardholder. Please verify the address and try again." msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:61 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:61 msgid "Payment error, please try another payment method or contact us to complete your transaction." msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:161 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:161 msgid "Card expiration date is invalid" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:185 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:185 msgid "Card number is missing" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:191 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:191 msgid "Card number is invalid (wrong length)" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:196 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:196 msgid "Card number is invalid (only digits allowed)" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:201 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:201 msgid "Card number is invalid" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:228 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:228 msgid "Card security code is invalid (only digits are allowed)" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:234 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:234 msgid "Card security code is invalid (must be 3 or 4 digits)" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:240 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:240 msgid "Card security code is missing" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:267 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:267 msgid "Routing Number is missing" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:274 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:274 msgid "Routing Number is invalid (only digits are allowed)" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:280 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:280 msgid "Routing number is invalid (must be 9 digits)" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:289 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:289 msgid "Account Number is missing" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:296 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:296 msgid "Account Number is invalid (only digits are allowed)" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:302 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:302 msgctxt "Bank account" msgid "Account number is invalid (must be between 5 and 17 digits)" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:309 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:507 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:309 +#: payment-gateway/class-sv-wc-payment-gateway.php:507 msgid "Driver's license number is invalid" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:315 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:503 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:315 +#: payment-gateway/class-sv-wc-payment-gateway.php:503 msgctxt "Bank check (noun)" msgid "Check Number is invalid (only digits are allowed)" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:493 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:493 msgid "Unknown error" msgstr "" #. translators: Placeholder: %s - Error message -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:503 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:503 msgid "Payment method address could not be updated. %s" msgstr "" #. translators: Placeholders: %1$s - Payment method title, %2$s - Payment account type (savings/checking) (may or may not be available), %3$s - Last four digits of the account #. translators: Context: "Check" as in "bank check" (noun, not verb). Placeholders: %1$s - payment method title, %2$s - payment account type (savings/checking) (may or may not be available), %3$s - last four digits of the account -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:673 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2783 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:673 +#: payment-gateway/class-sv-wc-payment-gateway.php:2783 msgid "%1$s Check Transaction Approved: %2$s account ending in %3$s" msgstr "" #. translators: Placeholder: %s - Bank check number #. translators: Context: "Check" as in "bank check" (noun, not verb). Placeholder: %s - check number -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:678 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2788 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:678 +#: payment-gateway/class-sv-wc-payment-gateway.php:2788 msgid "Check number %s" msgstr "" #. translators: Placeholder: %s - Payment transaction ID -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:684 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:781 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2196 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2429 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2748 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2794 -#: woocommerce/payment-gateway/Handlers/Capture.php:199 -#: woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:365 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:684 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:781 +#: payment-gateway/class-sv-wc-payment-gateway.php:2196 +#: payment-gateway/class-sv-wc-payment-gateway.php:2429 +#: payment-gateway/class-sv-wc-payment-gateway.php:2748 +#: payment-gateway/class-sv-wc-payment-gateway.php:2794 +#: payment-gateway/Handlers/Capture.php:199 +#: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:365 msgid "(Transaction ID %s)" msgstr "" #. translators: Example: "Braintree Test Authorization Approved: Mastercard ending in 1234". Placeholders: %1$s - payment method title, %2$s - environment ("Test"), %3$s - transaction type (authorization/charge), %4$s - card type (mastercard, visa, ...), %5$s - last four digits of the card -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:750 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:750 msgid "%1$s %2$s %3$s Approved: %4$s ending in %5$s" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:752 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:762 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:752 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:762 msgctxt "Noun, software environment" msgid "Test" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:753 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:763 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:753 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:763 msgctxt "Credit card transaction type" msgid "Authorization" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:753 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:763 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2722 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:3203 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:753 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:763 +#: payment-gateway/class-sv-wc-payment-gateway.php:2722 +#: payment-gateway/class-sv-wc-payment-gateway.php:3203 msgctxt "noun, credit card transaction type" msgid "Charge" msgstr "" #. translators: Example: "Authorize.Net Test Charge Approved: Mastercard" - Placeholders: %1$s - payment method title, %2$s - environment ("Test"), %3$s - transaction type (authorization/charge), %4$s - card type (mastercard, visa, ...) -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:760 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:760 msgid "%1$s %2$s %3$s Approved: %4$s" msgstr "" #. translators: Placeholder: %s - Credit card expiry date #. translators: Placeholders: %s - expiry date -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:773 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php:718 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2740 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:773 +#: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:718 +#: payment-gateway/class-sv-wc-payment-gateway.php:2740 msgid "(expires %s)" msgstr "" #. translators: Placeholders: %s - failure message -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:843 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:843 msgid "Tokenization Request Failed: %s" msgstr "" #. translators: Placeholders: %1$s - payment method title, %2$s - failure message -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:854 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:854 msgid "%1$s Tokenization Request Failed: %2$s" msgstr "" #. translators: This is a message describing that the transaction in question only performed a credit card authorization and did not capture any funds. -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:875 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1895 -#: woocommerce/payment-gateway/Handlers/Abstract_Payment_Handler.php:275 -#: woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:382 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:875 +#: payment-gateway/class-sv-wc-payment-gateway.php:1895 +#: payment-gateway/Handlers/Abstract_Payment_Handler.php:275 +#: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:382 msgid "Authorization only transaction" msgstr "" #. translators: Placeholders: %s - failure message. Payment method as in a specific credit card, e-check or bank account -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:912 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:912 msgid "Oops, adding your new payment method failed: %s" msgstr "" #. translators: Payment method as in a specific credit card. Placeholders: %1$s - card type (visa, mastercard, ...), %2$s - last four digits of the card, %3$s - card expiry date -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:957 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:957 msgid "Nice! New payment method added: %1$s ending in %2$s (expires %3$s)" msgstr "" #. translators: Payment method as in a specific e-check account. Placeholders: %1$s - account type (checking/savings), %2$s - last four digits of the account -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:967 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:967 msgid "Nice! New payment method added: %1$s account ending in %2$s" msgstr "" #. translators: Payment method as in a specific credit card, e-check or bank account -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:974 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:974 msgid "Nice! New payment method added." msgstr "" #. translators: Placeholders: %1$s - site title, %2$s - customer email. Payment method as in a specific credit card, e-check or bank account -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php:1097 +#: payment-gateway/class-sv-wc-payment-gateway-direct.php:1097 msgid "%1$s - Add Payment Method for %2$s" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-helper.php:178 +#: payment-gateway/class-sv-wc-payment-gateway-helper.php:178 msgid "PayPal" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-helper.php:179 +#: payment-gateway/class-sv-wc-payment-gateway-helper.php:179 msgid "Checking Account" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-helper.php:180 +#: payment-gateway/class-sv-wc-payment-gateway-helper.php:180 msgid "Savings Account" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-helper.php:181 +#: payment-gateway/class-sv-wc-payment-gateway-helper.php:181 msgid "Credit / Debit Card" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-helper.php:182 +#: payment-gateway/class-sv-wc-payment-gateway-helper.php:182 msgid "Bank Account" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-helper.php:191 +#: payment-gateway/class-sv-wc-payment-gateway-helper.php:191 msgctxt "payment method type" msgid "Account" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-helper.php:227 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:3462 +#: payment-gateway/class-sv-wc-payment-gateway-helper.php:227 +#: payment-gateway/class-sv-wc-payment-gateway.php:3462 msgctxt "credit card type" msgid "Visa" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-helper.php:231 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:3463 +#: payment-gateway/class-sv-wc-payment-gateway-helper.php:231 +#: payment-gateway/class-sv-wc-payment-gateway.php:3463 msgctxt "credit card type" msgid "MasterCard" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-helper.php:235 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:3464 +#: payment-gateway/class-sv-wc-payment-gateway-helper.php:235 +#: payment-gateway/class-sv-wc-payment-gateway.php:3464 msgctxt "credit card type" msgid "American Express" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-helper.php:239 +#: payment-gateway/class-sv-wc-payment-gateway-helper.php:239 msgctxt "credit card type" msgid "Diners Club" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-helper.php:243 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:3465 +#: payment-gateway/class-sv-wc-payment-gateway-helper.php:243 +#: payment-gateway/class-sv-wc-payment-gateway.php:3465 msgctxt "credit card type" msgid "Discover" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-helper.php:247 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:3467 +#: payment-gateway/class-sv-wc-payment-gateway-helper.php:247 +#: payment-gateway/class-sv-wc-payment-gateway.php:3467 msgctxt "credit card type" msgid "JCB" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-helper.php:251 +#: payment-gateway/class-sv-wc-payment-gateway-helper.php:251 msgctxt "credit card type" msgid "CarteBleue" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-helper.php:255 +#: payment-gateway/class-sv-wc-payment-gateway-helper.php:255 msgctxt "credit card type" msgid "Maestro" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-helper.php:259 +#: payment-gateway/class-sv-wc-payment-gateway-helper.php:259 msgctxt "credit card type" msgid "Laser" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-hosted.php:301 +#: payment-gateway/class-sv-wc-payment-gateway-hosted.php:301 msgid "Thank you for your order, please click the button below to pay." msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-hosted.php:302 +#: payment-gateway/class-sv-wc-payment-gateway-hosted.php:302 msgid "Thank you for your order. We are now redirecting you to complete payment." msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-hosted.php:303 +#: payment-gateway/class-sv-wc-payment-gateway-hosted.php:303 msgid "Pay Now" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-hosted.php:304 +#: payment-gateway/class-sv-wc-payment-gateway-hosted.php:304 msgid "Cancel Order" msgstr "" #. translators: Placeholders: %s - a WooCommerce order ID -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-hosted.php:449 -#: woocommerce/payment-gateway/Handlers/Abstract_Hosted_Payment_Handler.php:320 +#: payment-gateway/class-sv-wc-payment-gateway-hosted.php:449 +#: payment-gateway/Handlers/Abstract_Hosted_Payment_Handler.php:320 msgid "Could not find order %s" msgstr "" #. translators: Placeholders: %s - payment gateway title (such as Authorize.net, Braintree, etc) -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-hosted.php:513 -#: woocommerce/payment-gateway/Handlers/Abstract_Payment_Handler.php:205 +#: payment-gateway/class-sv-wc-payment-gateway-hosted.php:513 +#: payment-gateway/Handlers/Abstract_Payment_Handler.php:205 msgid "%s duplicate transaction received" msgstr "" #. translators: Placeholder: %s - Order number -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-hosted.php:517 -#: woocommerce/payment-gateway/Handlers/Abstract_Payment_Handler.php:208 +#: payment-gateway/class-sv-wc-payment-gateway-hosted.php:517 +#: payment-gateway/Handlers/Abstract_Payment_Handler.php:208 msgid "Order %s is already paid for." msgstr "" #. translators: Placeholders: %1$s - payment gateway title (such as Authorize.net, Braintree, etc), %2$s - payment method name (mastercard, bank account, etc), %3$s - last four digits of the card/account, %4$s - card/account expiry date -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-hosted.php:602 -#: woocommerce/payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:1121 +#: payment-gateway/class-sv-wc-payment-gateway-hosted.php:602 +#: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:1121 msgid "%1$s Payment Method Saved: %2$s ending in %3$s (expires %4$s)" msgstr "" #. translators: Placeholders: %1$s - payment gateway title (such as CyberSouce, NETbilling, etc), %2$s - account type (checking/savings - may or may not be available), %3$s - last four digits of the account -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-hosted.php:613 -#: woocommerce/payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:1132 +#: payment-gateway/class-sv-wc-payment-gateway-hosted.php:613 +#: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:1132 msgid "%1$s eCheck Payment Method Saved: %2$s account ending in %3$s" msgstr "" #. translators: Placeholders: %s - payment gateway title (such as CyberSouce, NETbilling, etc) -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-hosted.php:622 +#: payment-gateway/class-sv-wc-payment-gateway-hosted.php:622 msgid "%s Payment Method Saved" msgstr "" #. translators: Placeholders: %s - a failed tokenization API error -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-hosted.php:631 +#: payment-gateway/class-sv-wc-payment-gateway-hosted.php:631 msgid "Tokenization failed. %s" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:293 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:607 +#: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:293 +#: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:607 msgid "Edit" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:337 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1299 +#: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:337 +#: payment-gateway/class-sv-wc-payment-gateway.php:1299 msgid "Title" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:340 +#: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:340 msgid "Details" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:343 +#: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:343 msgid "Default?" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:609 +#: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:609 msgid "Oops, there was an error updating your payment method. Please try again." msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:610 +#: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:610 msgid "Are you sure you want to delete this payment method?" msgstr "" #. translators: Payment method as in a specific credit card, eCheck or bank account -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:697 +#: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:697 msgid "You do not have any saved payment methods." msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:872 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-privacy.php:201 +#: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:872 +#: payment-gateway/class-sv-wc-payment-gateway-privacy.php:201 msgid "Nickname" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:1118 +#: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:1118 msgid "Oops, you took too long, please try again." msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:1129 +#: payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php:1129 msgid "There was an error with your request, please try again." msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php:344 +#: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:344 msgid "Card Number" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php:365 +#: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:365 msgid "MM / YY" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php:384 +#: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:384 msgid "Card Security Code" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php:387 +#: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:387 msgid "CSC" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php:427 +#: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:427 msgid "Where do I find this?" msgstr "" #. translators: e-check routing number, HTML form field label, https://en.wikipedia.org/wiki/Routing_transit_number -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php:433 +#: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:433 msgid "Routing Number" msgstr "" #. translators: e-check account number, HTML form field label -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php:452 +#: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:452 msgid "Account Number" msgstr "" #. translators: http://www.investopedia.com/terms/c/checkingaccount.asp -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php:478 +#: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:478 msgctxt "account type" msgid "Checking" msgstr "" #. translators: http://www.investopedia.com/terms/s/savingsaccount.asp -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php:480 +#: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:480 msgctxt "account type" msgid "Savings" msgstr "" #. translators: Test mode refers to the current software environment -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php:518 +#: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:518 msgid "TEST MODE ENABLED" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php:545 +#: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:545 msgctxt "Bank check (noun)" msgid "Sample Check" msgstr "" #. translators: Payment method as in a specific credit card, eCheck or bank account -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php:620 +#: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:620 msgid "Manage Payment Methods" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php:757 +#: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:757 msgid "Use a new card" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php:757 +#: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:757 msgid "Use a new bank account" msgstr "" #. translators: account as in customer's account on the eCommerce site -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php:820 +#: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:820 msgid "Securely Save to Account" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php:954 +#: payment-gateway/class-sv-wc-payment-gateway-payment-form.php:954 msgid "Payment Info" msgstr "" #. translators: Placeholders: %1$s - plugin name, %2$s - tag, %3$s - tag -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php:706 +#: payment-gateway/class-sv-wc-payment-gateway-plugin.php:706 msgid "%1$s: WooCommerce is not being forced over SSL; your customers' payment data may be at risk. %2$sVerify your site URLs here%3$s" msgstr "" #. translators: Placeholders: %s - payment gateway name -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php:723 +#: payment-gateway/class-sv-wc-payment-gateway-plugin.php:723 msgid "%s will soon require TLS 1.2 support to process transactions and your server environment may need to be updated. Please contact your hosting provider to confirm that your site can send and receive TLS 1.2 connections and request they make any necessary updates." msgstr "" #. translators: Placeholders: %1$s - plugin name, %2$s - a currency/comma-separated list of currencies, %3$s - tag, %4$s - tag -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php:778 +#: payment-gateway/class-sv-wc-payment-gateway-plugin.php:778 msgid "%1$s accepts payment in %2$s only. %3$sConfigure%4$s WooCommerce to accept %2$s to enable this gateway for checkout." msgid_plural "%1$s accepts payment in one of %2$s only. %3$sConfigure%4$s WooCommerce to accept one of %2$s to enable this gateway for checkout." msgstr[0] "" msgstr[1] "" #. translators: Placeholders: %1$s - payment gateway name, %2$s - opening tag, %3$s - closing tag -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php:808 +#: payment-gateway/class-sv-wc-payment-gateway-plugin.php:808 msgid "Heads up! %1$s is currently configured to log transaction data for debugging purposes. If you are not experiencing any problems with payment processing, we recommend %2$sturning off Debug Mode%3$s" msgstr "" #. translators: Placeholders: %s - gateway name -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php:859 +#: payment-gateway/class-sv-wc-payment-gateway-plugin.php:859 msgid "%s is not configured" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php:871 +#: payment-gateway/class-sv-wc-payment-gateway-plugin.php:871 msgid "Dismiss" msgstr "" #. translators: Placeholders: %1$s - plugin name, %2$s - opening HTML link tag, %3$s - closing HTML link tag -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php:908 +#: payment-gateway/class-sv-wc-payment-gateway-plugin.php:908 msgid "Heads up! Apple Pay for %1$s requires WooCommerce version 3.2 or greater. Please %2$supdate WooCommerce%3$s." msgstr "" #. translators: Placeholders: %1$s - plugin name, %2$s - opening HTML link tag, %3$s - closing HTML link tag -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php:932 +#: payment-gateway/class-sv-wc-payment-gateway-plugin.php:932 msgid "Heads up! Google Pay for %1$s requires WooCommerce version 3.2 or greater. Please %2$supdate WooCommerce%3$s." msgstr "" #. translators: Placeholders: %1$s - payment gateway title (such as Authorize.net, Braintree, etc), %2$s - tag, %3$s - tag -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php:968 +#: payment-gateway/class-sv-wc-payment-gateway-plugin.php:968 msgid "%1$s is inactive for subscription transactions. Please %2$senable tokenization%3$s to activate %1$s for Subscriptions." msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php:986 +#: payment-gateway/class-sv-wc-payment-gateway-plugin.php:986 msgid "%1$s is inactive for pre-order transactions. Please %2$senable tokenization%3$s to activate %1$s for Pre-Orders." msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php:1023 +#: payment-gateway/class-sv-wc-payment-gateway-plugin.php:1023 msgid "You must enable tokenization for this gateway in order to support automatic renewal payments with the WooCommerce Subscriptions extension." msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php:1024 +#: payment-gateway/class-sv-wc-payment-gateway-plugin.php:1024 msgid "Inactive" msgstr "" #. translators: Placeholder: %s - Payment gateway title (e.g. Authorize.Net, Braintree...) -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-privacy.php:116 +#: payment-gateway/class-sv-wc-payment-gateway-privacy.php:116 msgid "%s Customer ID" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-privacy.php:185 +#: payment-gateway/class-sv-wc-payment-gateway-privacy.php:185 msgid "Type" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-privacy.php:256 +#: payment-gateway/class-sv-wc-payment-gateway-privacy.php:256 msgid "Removed payment token \"%d\"" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway-privacy.php:303 +#: payment-gateway/class-sv-wc-payment-gateway-privacy.php:303 msgid "Expiry Date" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:350 +#: payment-gateway/class-sv-wc-payment-gateway.php:350 msgctxt "Congratulatory message displayed to the merchant when they process their first payment" msgid "You successfully processed a payment!" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:355 +#: payment-gateway/class-sv-wc-payment-gateway.php:355 msgctxt "Congratulatory message displayed to the merchant when they process their first refund" msgid "You successfully processed a refund!" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:495 +#: payment-gateway/class-sv-wc-payment-gateway.php:495 msgctxt "Credit or debit card" msgid "Card number is missing" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:496 +#: payment-gateway/class-sv-wc-payment-gateway.php:496 msgctxt "Credit or debit card" msgid "Card number is invalid" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:497 +#: payment-gateway/class-sv-wc-payment-gateway.php:497 msgctxt "Credit or debit card" msgid "Card number is invalid (only digits allowed)" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:498 +#: payment-gateway/class-sv-wc-payment-gateway.php:498 msgctxt "Credit or debit card" msgid "Card number is invalid (wrong length)" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:499 +#: payment-gateway/class-sv-wc-payment-gateway.php:499 msgctxt "Credit or debit card" msgid "Card security code is missing" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:500 +#: payment-gateway/class-sv-wc-payment-gateway.php:500 msgctxt "Credit or debit card" msgid "Card security code is invalid (only digits are allowed)" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:501 +#: payment-gateway/class-sv-wc-payment-gateway.php:501 msgctxt "Credit or debit card" msgid "Card security code is invalid (must be 3 or 4 digits)" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:502 +#: payment-gateway/class-sv-wc-payment-gateway.php:502 msgctxt "Credit or debit card" msgid "Card expiration date is invalid" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:504 +#: payment-gateway/class-sv-wc-payment-gateway.php:504 msgctxt "Bank check (noun)" msgid "Check Number is missing" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:505 +#: payment-gateway/class-sv-wc-payment-gateway.php:505 msgctxt "For countries without states, \"state\" can be replaced with \"place of issue\"." msgid "Driver's license state is missing" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:506 +#: payment-gateway/class-sv-wc-payment-gateway.php:506 msgid "Driver's license number is missing" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:508 +#: payment-gateway/class-sv-wc-payment-gateway.php:508 msgctxt "Bank account" msgid "Account Number is missing" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:509 +#: payment-gateway/class-sv-wc-payment-gateway.php:509 msgctxt "Bank account" msgid "Account Number is invalid (only digits are allowed)" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:510 +#: payment-gateway/class-sv-wc-payment-gateway.php:510 msgctxt "Bank account" msgid "Account Number is invalid (must be between 5 and 17 digits)" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:511 +#: payment-gateway/class-sv-wc-payment-gateway.php:511 msgctxt "Bank account" msgid "Routing Number is missing" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:512 +#: payment-gateway/class-sv-wc-payment-gateway.php:512 msgctxt "Bank account" msgid "Routing Number is invalid (only digits are allowed)" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:513 +#: payment-gateway/class-sv-wc-payment-gateway.php:513 msgctxt "Bank account" msgid "Routing Number is invalid (must be 9 digits)" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:719 +#: payment-gateway/class-sv-wc-payment-gateway.php:719 msgid "Continue to Payment" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:719 +#: payment-gateway/class-sv-wc-payment-gateway.php:719 msgid "Place order" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:751 +#: payment-gateway/class-sv-wc-payment-gateway.php:751 msgid "Thank you for your order." msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1251 +#: payment-gateway/class-sv-wc-payment-gateway.php:1251 msgid "Credit Card" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1253 +#: payment-gateway/class-sv-wc-payment-gateway.php:1253 msgid "eCheck" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1271 +#: payment-gateway/class-sv-wc-payment-gateway.php:1271 msgid "Pay securely using your credit card." msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1273 +#: payment-gateway/class-sv-wc-payment-gateway.php:1273 msgid "Pay securely using your checking account." msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1292 -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:93 -#: woocommerce/payment-gateway/External_Checkout/Google_Pay/Admin.php:93 +#: payment-gateway/class-sv-wc-payment-gateway.php:1292 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:93 +#: payment-gateway/External_Checkout/Google_Pay/Admin.php:93 msgid "Enable / Disable" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1293 +#: payment-gateway/class-sv-wc-payment-gateway.php:1293 msgid "Enable this gateway" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1301 +#: payment-gateway/class-sv-wc-payment-gateway.php:1301 msgid "Payment method title that the customer will see during checkout." msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1306 +#: payment-gateway/class-sv-wc-payment-gateway.php:1306 msgid "Description" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1308 +#: payment-gateway/class-sv-wc-payment-gateway.php:1308 msgid "Payment method description that the customer will see during checkout." msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1337 +#: payment-gateway/class-sv-wc-payment-gateway.php:1337 msgid "Detailed Decline Messages" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1339 +#: payment-gateway/class-sv-wc-payment-gateway.php:1339 msgid "Check to enable detailed decline messages to the customer during checkout when possible, rather than a generic decline message." msgstr "" #. translators: Placeholders: %1$s - tag, %2$s - tag -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1349 +#: payment-gateway/class-sv-wc-payment-gateway.php:1349 msgid "Show Detailed Error Messages and API requests/responses on the checkout page and/or save them to the %1$sdebug log%2$s" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1353 +#: payment-gateway/class-sv-wc-payment-gateway.php:1353 msgid "Show on Checkout Page" msgstr "" #. translators: show debugging information on both checkout page and in the log -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1356 +#: payment-gateway/class-sv-wc-payment-gateway.php:1356 msgid "Both" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1422 +#: payment-gateway/class-sv-wc-payment-gateway.php:1422 msgid "Select the gateway environment to use for transactions." msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1470 -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:151 -#: woocommerce/payment-gateway/External_Checkout/Google_Pay/Admin.php:149 +#: payment-gateway/class-sv-wc-payment-gateway.php:1470 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:151 +#: payment-gateway/External_Checkout/Google_Pay/Admin.php:149 msgid "Connection Settings" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1476 +#: payment-gateway/class-sv-wc-payment-gateway.php:1476 msgid "Share connection settings" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1478 +#: payment-gateway/class-sv-wc-payment-gateway.php:1478 msgid "Use connection/authentication settings from other gateway" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1481 +#: payment-gateway/class-sv-wc-payment-gateway.php:1481 msgid "Disabled because the other gateway is using these settings" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1498 +#: payment-gateway/class-sv-wc-payment-gateway.php:1498 msgid "Card Security Code (CSC)" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1499 +#: payment-gateway/class-sv-wc-payment-gateway.php:1499 msgid "Display the Card Security Code (CSC) field on checkout" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1507 +#: payment-gateway/class-sv-wc-payment-gateway.php:1507 msgid "Saved Card Security Code" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1508 +#: payment-gateway/class-sv-wc-payment-gateway.php:1508 msgid "Display the Card Security Code field when paying with a saved card" msgstr "" #. translators: Placeholders: %1$s - site title, %2$s - order number -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1843 +#: payment-gateway/class-sv-wc-payment-gateway.php:1843 msgid "%1$s - Order %2$s" msgstr "" #. translators: Placeholders: %1$s - site title, %2$s - order number. Definitions: Capture as in capture funds from a credit card. -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1977 +#: payment-gateway/class-sv-wc-payment-gateway.php:1977 msgid "%1$s - Capture for Order %2$s" msgstr "" #. translators: Placeholders: %1$s - site title, %2$s - order number -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2120 +#: payment-gateway/class-sv-wc-payment-gateway.php:2120 msgid "%1$s - Refund for Order %2$s" msgstr "" #. translators: Placeholders: %1$s - payment gateway title (such as Authorize.net, Braintree, etc), %2$s - a monetary amount -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2187 +#: payment-gateway/class-sv-wc-payment-gateway.php:2187 msgid "%1$s Refund in the amount of %2$s approved." msgstr "" #. translators: Placeholders: %1$s - payment gateway title (such as Authorize.net, Braintree, etc), %2$s - error code, %3$s - error message -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2217 +#: payment-gateway/class-sv-wc-payment-gateway.php:2217 msgid "%1$s Refund Failed: %2$s - %3$s" msgstr "" #. translators: Placeholders: %1$s - payment gateway title (such as Authorize.net, Braintree, etc), %2$s - error message -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2225 +#: payment-gateway/class-sv-wc-payment-gateway.php:2225 msgid "%1$s Refund Failed: %2$s" msgstr "" #. translators: Placeholders: %s - payment gateway title (such as Authorize.net, Braintree, etc) -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2246 +#: payment-gateway/class-sv-wc-payment-gateway.php:2246 msgid "%s Order completely refunded." msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2301 +#: payment-gateway/class-sv-wc-payment-gateway.php:2301 msgid "Oops, you cannot partially void this order. Please use the full order amount." msgstr "" #. translators: Placeholders: %1$s - payment gateway title, %2$s - error code, %3$s - error message. Void as in to void an order. -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2388 +#: payment-gateway/class-sv-wc-payment-gateway.php:2388 msgid "%1$s Void Failed: %2$s - %3$s" msgstr "" #. translators: Placeholders: %1$s - payment gateway title, %2$s - error message. Void as in to void an order. -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2396 +#: payment-gateway/class-sv-wc-payment-gateway.php:2396 msgid "%1$s Void Failed: %2$s" msgstr "" #. translators: Placeholders: %1$s - payment gateway title, %2$s - a monetary amount. Void as in to void an order. -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2420 +#: payment-gateway/class-sv-wc-payment-gateway.php:2420 msgid "%1$s Void in the amount of %2$s approved." msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2495 +#: payment-gateway/class-sv-wc-payment-gateway.php:2495 msgctxt "hash before order number" msgid "#" msgstr "" #. translators: Placeholders: %1$s - status code, %2$s - status message #. translators: Placeholders: %1$s - Payment request response status code, %2$s - Payment request response status message -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2517 -#: woocommerce/payment-gateway/Handlers/Abstract_Payment_Handler.php:152 -#: woocommerce/payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:178 +#: payment-gateway/class-sv-wc-payment-gateway.php:2517 +#: payment-gateway/Handlers/Abstract_Payment_Handler.php:152 +#: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:178 msgid "Status code %1$s: %2$s" msgstr "" #. translators: Placeholders: %s - status code #. translators: Placeholder: %s - Payment request response status code -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2520 -#: woocommerce/payment-gateway/Handlers/Abstract_Payment_Handler.php:155 -#: woocommerce/payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:181 +#: payment-gateway/class-sv-wc-payment-gateway.php:2520 +#: payment-gateway/Handlers/Abstract_Payment_Handler.php:155 +#: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:181 msgid "Status code: %s" msgstr "" #. translators: Placeholders; %s - status message #. translators: Placeholder: %s - Status message #. translators: Placeholder: %s - Payment request response status message -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2523 -#: woocommerce/payment-gateway/Handlers/Abstract_Payment_Handler.php:158 -#: woocommerce/payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:184 +#: payment-gateway/class-sv-wc-payment-gateway.php:2523 +#: payment-gateway/Handlers/Abstract_Payment_Handler.php:158 +#: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:184 msgid "Status message: %s" msgstr "" #. translators: Placeholder: %s - Payment transaction ID -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2528 -#: woocommerce/payment-gateway/Handlers/Abstract_Payment_Handler.php:164 -#: woocommerce/payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:192 +#: payment-gateway/class-sv-wc-payment-gateway.php:2528 +#: payment-gateway/Handlers/Abstract_Payment_Handler.php:164 +#: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:192 msgid "Transaction ID %s" msgstr "" #. translators: Placeholders: %1$s - payment method title, %2$s - environment ("Test"), %3$s - transaction type (authorization/charge) -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2719 +#: payment-gateway/class-sv-wc-payment-gateway.php:2719 msgid "%1$s %2$s %3$s Approved" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2721 +#: payment-gateway/class-sv-wc-payment-gateway.php:2721 msgctxt "noun, software environment" msgid "Test" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2722 -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:3204 +#: payment-gateway/class-sv-wc-payment-gateway.php:2722 +#: payment-gateway/class-sv-wc-payment-gateway.php:3204 msgctxt "credit card transaction type" msgid "Authorization" msgstr "" #. translators: Placeholders: %1$s - credit card type (MasterCard, Visa, etc...), %2$s - last four digits of the card -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2729 +#: payment-gateway/class-sv-wc-payment-gateway.php:2729 msgid "%1$s ending in %2$s" msgstr "" #. translators: Placeholders: %1$s - payment gateway title, %2$s - message (probably reason for the transaction being held for review) -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2826 +#: payment-gateway/class-sv-wc-payment-gateway.php:2826 msgid "%1$s Transaction Held for Review (%2$s)" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2868 -#: woocommerce/payment-gateway/Handlers/Abstract_Payment_Handler.php:268 +#: payment-gateway/class-sv-wc-payment-gateway.php:2868 +#: payment-gateway/Handlers/Abstract_Payment_Handler.php:268 msgid "Your order has been received and is being reviewed. Thank you for your business." msgstr "" #. translators: Placeholders: %1$s - payment gateway title, %2$s - error message; e.g. Order Note: [Payment method] Payment failed [error] -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2915 +#: payment-gateway/class-sv-wc-payment-gateway.php:2915 msgid "%1$s Payment Failed (%2$s)" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2932 -#: woocommerce/payment-gateway/Handlers/Abstract_Hosted_Payment_Handler.php:217 -#: woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:526 +#: payment-gateway/class-sv-wc-payment-gateway.php:2932 +#: payment-gateway/Handlers/Abstract_Hosted_Payment_Handler.php:217 +#: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:532 msgid "An error occurred, please try again or try an alternate form of payment." msgstr "" #. translators: Placeholders: %1$s - payment gateway title, %2$s - message/error -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:2950 +#: payment-gateway/class-sv-wc-payment-gateway.php:2950 msgid "%1$s Transaction Cancelled (%2$s)" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:3198 +#: payment-gateway/class-sv-wc-payment-gateway.php:3198 msgid "Transaction Type" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:3200 +#: payment-gateway/class-sv-wc-payment-gateway.php:3200 msgid "Select how transactions should be processed. Charge submits all transactions for settlement, Authorization simply authorizes the order total for capture later." msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:3211 +#: payment-gateway/class-sv-wc-payment-gateway.php:3211 msgid "Charge Virtual-Only Orders" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:3213 +#: payment-gateway/class-sv-wc-payment-gateway.php:3213 msgid "If the order contains exclusively virtual items, enable this to immediately charge, rather than authorize, the transaction." msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:3221 +#: payment-gateway/class-sv-wc-payment-gateway.php:3221 msgid "Enable Partial Capture" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:3223 +#: payment-gateway/class-sv-wc-payment-gateway.php:3223 msgid "Allow orders to be partially captured multiple times." msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:3232 +#: payment-gateway/class-sv-wc-payment-gateway.php:3232 msgctxt "coordinating conjunction for a list of order statuses: on-hold, processing, or completed" msgid "or" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:3235 +#: payment-gateway/class-sv-wc-payment-gateway.php:3235 msgid "Capture Paid Orders" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:3238 +#: payment-gateway/class-sv-wc-payment-gateway.php:3238 msgid "Automatically capture orders when they are changed to %s." msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:3239 +#: payment-gateway/class-sv-wc-payment-gateway.php:3239 msgid "a paid status" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:3429 +#: payment-gateway/class-sv-wc-payment-gateway.php:3429 msgid "Accepted Card Logos" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:3431 +#: payment-gateway/class-sv-wc-payment-gateway.php:3431 msgid "These are the card logos that are displayed to customers as accepted during checkout." msgstr "" #. translators: Placeholders: %1$s - tag, %2$s - tag -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:3434 +#: payment-gateway/class-sv-wc-payment-gateway.php:3434 msgid "This setting %1$sdoes not%2$s change which card types the gateway will accept. Accepted cards are configured from your payment processor account." msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:3466 +#: payment-gateway/class-sv-wc-payment-gateway.php:3466 msgctxt "credit card type" msgid "Diners" msgstr "" #. translators: http://www.cybersource.com/products/payment_security/payment_tokenization/ and https://en.wikipedia.org/wiki/Tokenization_(data_security) -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:3525 +#: payment-gateway/class-sv-wc-payment-gateway.php:3525 msgid "Tokenization" msgstr "" -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:3526 +#: payment-gateway/class-sv-wc-payment-gateway.php:3526 msgid "Allow customers to securely save their payment details for future checkout." msgstr "" #. translators: https://www.skyverge.com/for-translators-environments -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:4037 +#: payment-gateway/class-sv-wc-payment-gateway.php:4037 msgctxt "software environment" msgid "Production" msgstr "" #. translators: %1$s - gateway name, %2$s - tag, %3$s - tag, %4$s - tag, %5$s - tag -#: woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:4311 +#: payment-gateway/class-sv-wc-payment-gateway.php:4311 msgid "Heads up! %1$s is not fully configured and cannot accept payments. Please %2$sreview the documentation%3$s and configure the %4$sgateway settings%5$s." msgstr "" -#: woocommerce/payment-gateway/External_Checkout/Admin.php:137 -#: woocommerce/payment-gateway/External_Checkout/Admin.php:147 +#: payment-gateway/External_Checkout/Admin.php:137 +#: payment-gateway/External_Checkout/Admin.php:147 msgctxt "Noun: payment gateway used to process a transaction" msgid "Processing Gateway" msgstr "" -#: woocommerce/payment-gateway/External_Checkout/Admin.php:287 +#: payment-gateway/External_Checkout/Admin.php:287 msgid "Single products" msgstr "" -#: woocommerce/payment-gateway/External_Checkout/Admin.php:288 +#: payment-gateway/External_Checkout/Admin.php:288 msgid "Cart" msgstr "" -#: woocommerce/payment-gateway/External_Checkout/Admin.php:289 +#: payment-gateway/External_Checkout/Admin.php:289 msgid "Checkout" msgstr "" #. translators: Placeholder: %s - external checkout label -#: woocommerce/payment-gateway/External_Checkout/Admin.php:330 +#: payment-gateway/External_Checkout/Admin.php:330 msgid "%s is disabled." msgstr "" #. translators: Context: Error message displayed to merchants if their store currency is not in one of the accepted currencies by the payment gateway they intend to enable. Placeholders: %1$s - a currency or comma-separated list of currencies, %2$s - opening HTML tag, %3$s - closing HTML tag, %4$s - payment method title/label -#: woocommerce/payment-gateway/External_Checkout/Admin.php:394 +#: payment-gateway/External_Checkout/Admin.php:394 msgid "Accepts payment in %1$s only. %2$sConfigure%3$s WooCommerce to accept %1$s to enable %4$s." msgid_plural "Accepts payment in %1$s only. %2$sConfigure%3$s WooCommerce to accept %1$s to enable %4$s." msgstr[0] "" msgstr[1] "" #. translators: Placeholders: %1$s - Checkout method label, %2$s - Opening HTML tag, %3$s - Closing HTML tag, %4$s - Opening HTML tag, %5$s - closing HTML tag -#: woocommerce/payment-gateway/External_Checkout/Admin.php:431 +#: payment-gateway/External_Checkout/Admin.php:431 msgid "Your store %1$scalculates taxes%2$s based on the shipping address, but %1$s %4$sdoes not%5$s share customer shipping information with your store for orders with only virtual products. These orders will have their taxes calculated based on the shop address instead." msgstr "" -#: woocommerce/payment-gateway/External_Checkout/Admin.php:464 +#: payment-gateway/External_Checkout/Admin.php:464 msgid "%4$s%1$s Notice!%5$s Your store %2$scalculates taxes%3$s based on the billing address, but %1$s %4$sdoes not%5$s share the customer billing address with your store before payment. These orders will have their taxes calculated based on the shipping address (or shop address, for orders with only virtual products)." msgstr "" -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:71 -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:87 -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:65 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:71 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:87 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:65 msgid "Apple Pay" msgstr "" -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:94 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:94 msgctxt "For the merchant to accept Apple Pay payments" msgid "Accept Apple Pay" msgstr "" #. translators: Allow Apple Pay button on selected display locations (e.g. cart, checkout, product page...) -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:102 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:102 msgid "Allow Apple Pay on" msgstr "" -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:112 -#: woocommerce/payment-gateway/External_Checkout/Google_Pay/Admin.php:112 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:112 +#: payment-gateway/External_Checkout/Google_Pay/Admin.php:112 msgid "Button Style" msgstr "" -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:115 -#: woocommerce/payment-gateway/External_Checkout/Google_Pay/Admin.php:115 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:115 +#: payment-gateway/External_Checkout/Google_Pay/Admin.php:115 msgctxt "Button style" msgid "Black" msgstr "" -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:116 -#: woocommerce/payment-gateway/External_Checkout/Google_Pay/Admin.php:116 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:116 +#: payment-gateway/External_Checkout/Google_Pay/Admin.php:116 msgctxt "Button style" msgid "White" msgstr "" -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:117 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:117 msgctxt "Button style" msgid "White with outline" msgstr "" -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:160 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:160 msgid "Apple Merchant ID" msgstr "" #. translators: Placeholders: %1$s - tag, %2$s - tag -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:164 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:164 msgid "This is found in your %1$sApple developer account%2$s" msgstr "" -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:174 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:174 msgid "Certificate Path" msgstr "" -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:176 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:176 msgid "The full system path to your certificate file from Apple. For security reasons you should store this outside of your web root." msgstr "" #. translators: Placeholders: %s - the server's web root path -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:179 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:179 msgid "For reference, your current web root path is: %s" msgstr "" -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:189 -#: woocommerce/payment-gateway/External_Checkout/Google_Pay/Admin.php:158 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:189 +#: payment-gateway/External_Checkout/Google_Pay/Admin.php:158 msgid "Test Mode" msgstr "" -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:190 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:190 msgid "Enable to test Apple Pay functionality throughout your sites without processing real payments." msgstr "" -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:229 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:229 msgid "Your site must be served over HTTPS with a valid SSL certificate." msgstr "" -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:239 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php:239 msgid "Your %1$sMerchant Identity Certificate%2$s cannot be found. Please check your path configuration." msgstr "" -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php:176 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php:176 msgctxt "Apple Pay" msgid "Buy with" msgstr "" -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:152 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:152 msgid "Apple Pay payment authorized." msgstr "" -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:186 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:186 msgid "Apple Pay payment failed. %s" msgstr "" -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:539 -#: woocommerce/payment-gateway/External_Checkout/Google_Pay/Google_Pay.php:255 -#: woocommerce/payment-gateway/External_Checkout/Google_Pay/Google_Pay.php:380 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:539 +#: payment-gateway/External_Checkout/Google_Pay/Google_Pay.php:255 +#: payment-gateway/External_Checkout/Google_Pay/Google_Pay.php:380 msgid "Subtotal" msgstr "" -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:549 -#: woocommerce/payment-gateway/External_Checkout/Google_Pay/Google_Pay.php:390 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:549 +#: payment-gateway/External_Checkout/Google_Pay/Google_Pay.php:390 msgid "Discount" msgstr "" -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:559 -#: woocommerce/payment-gateway/External_Checkout/Google_Pay/Google_Pay.php:400 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:559 +#: payment-gateway/External_Checkout/Google_Pay/Google_Pay.php:400 msgid "Shipping" msgstr "" -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:569 -#: woocommerce/payment-gateway/External_Checkout/Google_Pay/Google_Pay.php:410 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:569 +#: payment-gateway/External_Checkout/Google_Pay/Google_Pay.php:410 msgid "Fees" msgstr "" -#: woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:579 -#: woocommerce/payment-gateway/External_Checkout/Google_Pay/Google_Pay.php:420 +#: payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php:579 +#: payment-gateway/External_Checkout/Google_Pay/Google_Pay.php:420 msgid "Taxes" msgstr "" -#: woocommerce/payment-gateway/External_Checkout/Frontend.php:259 +#: payment-gateway/External_Checkout/Frontend.php:259 msgid "or" msgstr "" -#: woocommerce/payment-gateway/External_Checkout/Frontend.php:293 +#: payment-gateway/External_Checkout/Frontend.php:293 msgid "By submitting your payment, you agree to our %1$sterms and conditions%2$s." msgstr "" -#: woocommerce/payment-gateway/External_Checkout/Google_Pay/Admin.php:71 -#: woocommerce/payment-gateway/External_Checkout/Google_Pay/Admin.php:87 -#: woocommerce/payment-gateway/External_Checkout/Google_Pay/Google_Pay.php:66 +#: payment-gateway/External_Checkout/Google_Pay/Admin.php:71 +#: payment-gateway/External_Checkout/Google_Pay/Admin.php:87 +#: payment-gateway/External_Checkout/Google_Pay/Google_Pay.php:66 msgid "Google Pay" msgstr "" -#: woocommerce/payment-gateway/External_Checkout/Google_Pay/Admin.php:94 +#: payment-gateway/External_Checkout/Google_Pay/Admin.php:94 msgctxt "For the merchant to accept Google Pay payments" msgid "Accept Google Pay" msgstr "" #. translators: Allow Google Pay button on selected display locations (e.g. cart, checkout, product page...) -#: woocommerce/payment-gateway/External_Checkout/Google_Pay/Admin.php:102 +#: payment-gateway/External_Checkout/Google_Pay/Admin.php:102 msgctxt "Setting title for a multi-select list dropdown of display locations" msgid "Allow Google Pay on" msgstr "" -#: woocommerce/payment-gateway/External_Checkout/Google_Pay/Admin.php:159 +#: payment-gateway/External_Checkout/Google_Pay/Admin.php:159 msgid "Enable to test Google Pay functionality throughout your sites without processing real payments." msgstr "" -#: woocommerce/payment-gateway/External_Checkout/Google_Pay/Google_Pay.php:463 +#: payment-gateway/External_Checkout/Google_Pay/Google_Pay.php:463 msgid "Google Pay payment authorized." msgstr "" -#: woocommerce/payment-gateway/External_Checkout/Google_Pay/Google_Pay.php:538 +#: payment-gateway/External_Checkout/Google_Pay/Google_Pay.php:538 msgid "Google Pay payment failed. %s" msgstr "" -#: woocommerce/payment-gateway/External_Checkout/Orders.php:140 -#: woocommerce/payment-gateway/External_Checkout/Orders.php:153 -#: woocommerce/payment-gateway/External_Checkout/Orders.php:157 +#: payment-gateway/External_Checkout/Orders.php:140 +#: payment-gateway/External_Checkout/Orders.php:153 +#: payment-gateway/External_Checkout/Orders.php:157 msgid "Error %d: Unable to create order. Please try again." msgstr "" -#: woocommerce/payment-gateway/Handlers/Abstract_Hosted_Payment_Handler.php:179 +#: payment-gateway/Handlers/Abstract_Hosted_Payment_Handler.php:179 msgid "There was a problem processing your order and it is being placed on hold for review. Please contact us to complete the transaction." msgstr "" #. translators: Example: "Authorize.Net Transaction Held for Review". Placeholder: %s - Payment gateway title -#: woocommerce/payment-gateway/Handlers/Abstract_Payment_Handler.php:365 +#: payment-gateway/Handlers/Abstract_Payment_Handler.php:365 msgid "%s Transaction Held for Review" msgstr "" #. translators: Placeholders: %s - payment gateway title -#: woocommerce/payment-gateway/Handlers/Abstract_Payment_Handler.php:436 +#: payment-gateway/Handlers/Abstract_Payment_Handler.php:436 msgid "%s Payment Failed" msgstr "" #. translators: Placeholders: %s - payment gateway title -#: woocommerce/payment-gateway/Handlers/Abstract_Payment_Handler.php:463 +#: payment-gateway/Handlers/Abstract_Payment_Handler.php:463 msgid "%s Transaction Cancelled" msgstr "" -#: woocommerce/payment-gateway/Handlers/Capture.php:158 +#: payment-gateway/Handlers/Capture.php:158 msgid "Order cannot be captured" msgstr "" -#: woocommerce/payment-gateway/Handlers/Capture.php:163 +#: payment-gateway/Handlers/Capture.php:163 msgid "Transaction authorization has expired" msgstr "" -#: woocommerce/payment-gateway/Handlers/Capture.php:168 +#: payment-gateway/Handlers/Capture.php:168 msgid "Transaction has already been fully captured" msgstr "" -#: woocommerce/payment-gateway/Handlers/Capture.php:173 +#: payment-gateway/Handlers/Capture.php:173 msgid "Transaction cannot be captured" msgstr "" #. translators: Placeholders: %1$s - payment gateway title (such as Authorize.net, Braintree, etc), %2$s - transaction amount. Definitions: Capture, as in capture funds from a credit card. -#: woocommerce/payment-gateway/Handlers/Capture.php:189 +#: payment-gateway/Handlers/Capture.php:189 msgid "%1$s Capture of %2$s Approved" msgstr "" #. translators: Placeholders: %1$s - payment gateway title (such as Authorize.net, Braintree, etc), %2$s - failure message. Definitions: "capture" as in capturing funds from a credit card. -#: woocommerce/payment-gateway/Handlers/Capture.php:230 +#: payment-gateway/Handlers/Capture.php:230 msgid "%1$s Capture Failed: %2$s" msgstr "" -#: woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:261 +#: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:261 msgid "Pre-Order Tokenization attempt failed (%s)" msgstr "" #. translators: Context: A payment is released for a pre-order. Placeholders: %1$s - Site name, %2$s - Order number -#: woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:309 +#: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:309 msgid "%1$s - Pre-Order Release Payment for Order %2$s" msgstr "" -#: woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:316 +#: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:316 msgid "Payment token missing/invalid." msgstr "" #. translators: Context: A payment is released for a pre-order. Placeholders: %1$s - Payment gateway name, %2$s - Either 'Authorization' or 'Charge' (untranslated), %3$s - Payment method type (e.g. 'PayPal', 'Credit Card', etc.), %4$s - Last four digits of the card or account, %5$s - Expiration date of the payment method -#: woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:342 +#: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:342 msgid "%1$s %2$s Pre-Order Release Payment Approved: %3$s ending in %4$s (expires %5$s)" msgstr "" #. translators: Context: A payment is released for a pre-order. Placeholders: %1$s - Payment gateway name, %2$s - Payment method type (e.g. 'Bank Account'), %3$s - Last four digits of the account -#: woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:355 +#: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:355 msgid "%1$s eCheck Pre-Order Release Payment Approved: %2$s ending in %3$s" msgstr "" #. translators: Context: Release of payment for pre-order failed. Placeholder: %s - Error message -#: woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:407 +#: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php:407 msgid "Pre-Order Release Payment Failed: %s" msgstr "" -#: woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:358 +#: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:362 msgid "Subscription Renewal: payment token is missing/invalid." msgstr "" #. translators: Placeholders: %1$s - Site name, %2$s - Order number -#: woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:386 +#: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:390 msgid "%1$s - Subscription Renewal Order %2$s" msgstr "" #. translators: Placeholders: %1$s - payment gateway title, %2$s - error message; e.g. Order Note: [Payment method] Payment Change failed [error] -#: woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:521 +#: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:527 msgid "%1$s Payment Change Failed (%2$s)" msgstr "" #. translators: Context: Payment made for order. Placeholders: %1$s - Payment method name (e.g. "Credit Card", "PayPal", etc.), %2$s - Last four digits of the card/account used -#: woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:679 +#: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:685 msgid "Via %1$s ending in %2$s" msgstr "" -#: woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:710 +#: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:716 msgid "Subscriptions" msgstr "" -#: woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:765 +#: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:771 msgctxt "hash before order number" msgid "#%s" msgstr "" -#: woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:771 +#: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:777 msgid "N/A" msgstr "" -#: woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:870 +#: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:876 msgid "Payment Token" msgstr "" #. translators: Context: Error message. Placeholder: %s - Label of the related value -#: woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:900 -#: woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:906 +#: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:906 +#: payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php:912 msgid "%s is required." msgstr "" -#: woocommerce/payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:186 +#: payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php:186 msgid "Unknown Error" msgstr "" -#: woocommerce/rest-api/Controllers/Settings.php:119 +#: rest-api/Controllers/Settings.php:119 msgid "Sorry, you cannot list resources." msgstr "" #. translators: Placeholder: %s - setting ID -#: woocommerce/rest-api/Controllers/Settings.php:168 +#: rest-api/Controllers/Settings.php:168 msgid "Setting %s does not exist" msgstr "" -#: woocommerce/rest-api/Controllers/Settings.php:191 +#: rest-api/Controllers/Settings.php:191 msgid "Sorry, you cannot edit this resource." msgstr "" #. translators: Placeholder: %s - Error message -#: woocommerce/rest-api/Controllers/Settings.php:224 +#: rest-api/Controllers/Settings.php:224 msgid "Could not update setting: %s" msgstr "" -#: woocommerce/rest-api/Controllers/Settings.php:294 +#: rest-api/Controllers/Settings.php:294 msgid "Unique identifier of the setting." msgstr "" -#: woocommerce/rest-api/Controllers/Settings.php:300 +#: rest-api/Controllers/Settings.php:300 msgid "The type of the setting." msgstr "" -#: woocommerce/rest-api/Controllers/Settings.php:307 +#: rest-api/Controllers/Settings.php:307 msgid "The name of the setting." msgstr "" -#: woocommerce/rest-api/Controllers/Settings.php:313 +#: rest-api/Controllers/Settings.php:313 msgid "The description of the setting. It may or may not be used for display." msgstr "" -#: woocommerce/rest-api/Controllers/Settings.php:319 +#: rest-api/Controllers/Settings.php:319 msgid "Whether the setting stores an array of values or a single value." msgstr "" -#: woocommerce/rest-api/Controllers/Settings.php:325 +#: rest-api/Controllers/Settings.php:325 msgid "A list of valid options, used for validation before storing the value." msgstr "" -#: woocommerce/rest-api/Controllers/Settings.php:331 +#: rest-api/Controllers/Settings.php:331 msgid "Optional default value for the setting." msgstr "" -#: woocommerce/rest-api/Controllers/Settings.php:337 +#: rest-api/Controllers/Settings.php:337 msgid "The value of the setting." msgstr "" -#: woocommerce/rest-api/Controllers/Settings.php:346 +#: rest-api/Controllers/Settings.php:346 msgid "The type of the control." msgstr "" -#: woocommerce/rest-api/Controllers/Settings.php:353 +#: rest-api/Controllers/Settings.php:353 msgid "The name of the control. Inherits the setting's name." msgstr "" -#: woocommerce/rest-api/Controllers/Settings.php:359 +#: rest-api/Controllers/Settings.php:359 msgid "The description of the control. Inherits the setting's description." msgstr "" -#: woocommerce/rest-api/Controllers/Settings.php:365 +#: rest-api/Controllers/Settings.php:365 msgid "A list of key/value pairs defining the display value of each setting option. The keys should match the options defined in the base setting for validation." msgstr "" -#: woocommerce/utilities/class-sv-wp-background-job-handler.php:659 +#: utilities/class-sv-wp-background-job-handler.php:659 msgid "Job data key \"%s\" not set" msgstr "" -#: woocommerce/utilities/class-sv-wp-background-job-handler.php:663 +#: utilities/class-sv-wp-background-job-handler.php:663 msgid "Job data key \"%s\" is not an array" msgstr "" -#: woocommerce/utilities/class-sv-wp-background-job-handler.php:1063 +#: utilities/class-sv-wp-background-job-handler.php:1063 msgid "Background Processing Test" msgstr "" -#: woocommerce/utilities/class-sv-wp-background-job-handler.php:1064 +#: utilities/class-sv-wp-background-job-handler.php:1064 msgid "Run Test" msgstr "" -#: woocommerce/utilities/class-sv-wp-background-job-handler.php:1065 +#: utilities/class-sv-wp-background-job-handler.php:1065 msgid "This tool will test whether your server is capable of processing background jobs." msgstr "" -#: woocommerce/utilities/class-sv-wp-background-job-handler.php:1083 +#: utilities/class-sv-wp-background-job-handler.php:1083 msgid "Success! You should be able to process background jobs." msgstr "" -#: woocommerce/utilities/class-sv-wp-background-job-handler.php:1086 +#: utilities/class-sv-wp-background-job-handler.php:1086 msgid "Could not connect. Please ask your hosting company to ensure your server has loopback connections enabled." msgstr "" diff --git a/woocommerce/payment-gateway/External_Checkout/Admin.php b/woocommerce/payment-gateway/External_Checkout/Admin.php index c70e6e3ef..8838f8ae3 100644 --- a/woocommerce/payment-gateway/External_Checkout/Admin.php +++ b/woocommerce/payment-gateway/External_Checkout/Admin.php @@ -22,9 +22,9 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10\Payment_Gateway\External_Checkout; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11\Payment_Gateway\External_Checkout; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\SV_WC_Helper; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\SV_WC_Helper; defined( 'ABSPATH' ) or exit; diff --git a/woocommerce/payment-gateway/External_Checkout/External_Checkout.php b/woocommerce/payment-gateway/External_Checkout/External_Checkout.php index f9dfbbce4..63627a864 100644 --- a/woocommerce/payment-gateway/External_Checkout/External_Checkout.php +++ b/woocommerce/payment-gateway/External_Checkout/External_Checkout.php @@ -22,10 +22,10 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10\Payment_Gateway\External_Checkout; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11\Payment_Gateway\External_Checkout; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\SV_WC_Payment_Gateway; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\SV_WC_Payment_Gateway_Plugin; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\SV_WC_Payment_Gateway; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\SV_WC_Payment_Gateway_Plugin; defined( 'ABSPATH' ) or exit; diff --git a/woocommerce/payment-gateway/External_Checkout/Frontend.php b/woocommerce/payment-gateway/External_Checkout/Frontend.php index 56d42088f..f751e1a5c 100644 --- a/woocommerce/payment-gateway/External_Checkout/Frontend.php +++ b/woocommerce/payment-gateway/External_Checkout/Frontend.php @@ -23,16 +23,16 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10\Payment_Gateway\External_Checkout; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11\Payment_Gateway\External_Checkout; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\Handlers\Script_Handler; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\SV_WC_Helper; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\SV_WC_Payment_Gateway; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\SV_WC_Payment_Gateway_Plugin; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\Handlers\Script_Handler; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\SV_WC_Helper; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\SV_WC_Payment_Gateway; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\SV_WC_Payment_Gateway_Plugin; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\Payment_Gateway\\External_Checkout\\Frontend' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\Payment_Gateway\\External_Checkout\\Frontend' ) ) : /** @@ -322,7 +322,7 @@ public function render_terms_notice() { */ public function enqueue_scripts() { - wp_enqueue_style( 'sv-wc-external-checkout-v5_11_10', $this->get_handler()->get_plugin()->get_payment_gateway_framework_assets_url() . '/css/frontend/sv-wc-payment-gateway-external-checkout.css', array(), $this->get_handler()->get_plugin()->get_version() ); // TODO: min + wp_enqueue_style( 'sv-wc-external-checkout-v5_11_11', $this->get_handler()->get_plugin()->get_payment_gateway_framework_assets_url() . '/css/frontend/sv-wc-payment-gateway-external-checkout.css', array(), $this->get_handler()->get_plugin()->get_version() ); // TODO: min } diff --git a/woocommerce/payment-gateway/External_Checkout/Google_Pay/AJAX.php b/woocommerce/payment-gateway/External_Checkout/Google_Pay/AJAX.php index 2f5fcd978..e034aab1c 100644 --- a/woocommerce/payment-gateway/External_Checkout/Google_Pay/AJAX.php +++ b/woocommerce/payment-gateway/External_Checkout/Google_Pay/AJAX.php @@ -22,14 +22,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10\Payment_Gateway\External_Checkout\Google_Pay; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11\Payment_Gateway\External_Checkout\Google_Pay; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\SV_WC_Helper; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\SV_WC_Payment_Gateway_Exception; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\SV_WC_Helper; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\SV_WC_Payment_Gateway_Exception; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\Payment_Gateway\\External_Checkout\\Google_Pay\\AJAX' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\Payment_Gateway\\External_Checkout\\Google_Pay\\AJAX' ) ) : /** diff --git a/woocommerce/payment-gateway/External_Checkout/Google_Pay/Admin.php b/woocommerce/payment-gateway/External_Checkout/Google_Pay/Admin.php index ccee4c307..8d2ebcda8 100755 --- a/woocommerce/payment-gateway/External_Checkout/Google_Pay/Admin.php +++ b/woocommerce/payment-gateway/External_Checkout/Google_Pay/Admin.php @@ -22,13 +22,13 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10\Payment_Gateway\External_Checkout\Google_Pay; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11\Payment_Gateway\External_Checkout\Google_Pay; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\SV_WC_Helper; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\SV_WC_Helper; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\Payment_Gateway\\External_Checkout\\Google_Pay\\Admin' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\Payment_Gateway\\External_Checkout\\Google_Pay\\Admin' ) ) : /** @@ -36,7 +36,7 @@ * * @since 5.10.0 */ -class Admin extends \SkyVerge\WooCommerce\PluginFramework\v5_11_10\Payment_Gateway\External_Checkout\Admin { +class Admin extends \SkyVerge\WooCommerce\PluginFramework\v5_11_11\Payment_Gateway\External_Checkout\Admin { /** @var Google_Pay the Google Pay handler instance */ diff --git a/woocommerce/payment-gateway/External_Checkout/Google_Pay/Frontend.php b/woocommerce/payment-gateway/External_Checkout/Google_Pay/Frontend.php index 3c2978f9c..6b9e87937 100644 --- a/woocommerce/payment-gateway/External_Checkout/Google_Pay/Frontend.php +++ b/woocommerce/payment-gateway/External_Checkout/Google_Pay/Frontend.php @@ -22,14 +22,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10\Payment_Gateway\External_Checkout\Google_Pay; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11\Payment_Gateway\External_Checkout\Google_Pay; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\SV_WC_Payment_Gateway_Exception; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\SV_WC_Payment_Gateway_Plugin; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\SV_WC_Payment_Gateway_Exception; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\SV_WC_Payment_Gateway_Plugin; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\Payment_Gateway\\External_Checkout\\Google_Pay\\Frontend' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\Payment_Gateway\\External_Checkout\\Google_Pay\\Frontend' ) ) : /** @@ -37,7 +37,7 @@ * * @since 5.10.0 */ -class Frontend extends \SkyVerge\WooCommerce\PluginFramework\v5_11_10\Payment_Gateway\External_Checkout\Frontend { +class Frontend extends \SkyVerge\WooCommerce\PluginFramework\v5_11_11\Payment_Gateway\External_Checkout\Frontend { /** @var string JS handler base class name, without the FW version */ @@ -94,7 +94,7 @@ public function enqueue_scripts() { parent::enqueue_scripts(); wp_enqueue_script( 'google-pay-js-library', 'https://pay.google.com/gp/p/js/pay.js', array(), null, true ); - wp_enqueue_script( 'sv-wc-google-pay-v5_11_10', $this->get_plugin()->get_payment_gateway_framework_assets_url() . '/dist/frontend/sv-wc-payment-gateway-google-pay.js', [ 'google-pay-js-library', 'jquery' ], $this->get_plugin()->get_version(), true ); + wp_enqueue_script( 'sv-wc-google-pay-v5_11_11', $this->get_plugin()->get_payment_gateway_framework_assets_url() . '/dist/frontend/sv-wc-payment-gateway-google-pay.js', [ 'google-pay-js-library', 'jquery' ], $this->get_plugin()->get_version(), true ); } diff --git a/woocommerce/payment-gateway/External_Checkout/Google_Pay/Google_Pay.php b/woocommerce/payment-gateway/External_Checkout/Google_Pay/Google_Pay.php index e63757c62..3030fff17 100755 --- a/woocommerce/payment-gateway/External_Checkout/Google_Pay/Google_Pay.php +++ b/woocommerce/payment-gateway/External_Checkout/Google_Pay/Google_Pay.php @@ -22,17 +22,17 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10\Payment_Gateway\External_Checkout\Google_Pay; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11\Payment_Gateway\External_Checkout\Google_Pay; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\Payment_Gateway\External_Checkout\External_Checkout; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\Payment_Gateway\External_Checkout\Orders; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\SV_WC_Payment_Gateway_Exception; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\SV_WC_Payment_Gateway_Helper; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\SV_WC_Payment_Gateway_Plugin; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\Payment_Gateway\External_Checkout\External_Checkout; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\Payment_Gateway\External_Checkout\Orders; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\SV_WC_Payment_Gateway_Exception; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\SV_WC_Payment_Gateway_Helper; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\SV_WC_Payment_Gateway_Plugin; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\Payment_Gateway\\External_Checkout\\Google_Pay\\Google_Pay' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\Payment_Gateway\\External_Checkout\\Google_Pay\\Google_Pay' ) ) : /** @@ -675,7 +675,7 @@ public function get_supported_networks() { $accepted_card_types = ( $this->get_processing_gateway() ) ? $this->get_processing_gateway()->get_card_types() : []; - $accepted_card_types = array_map( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Helper::normalize_card_type', $accepted_card_types ); + $accepted_card_types = array_map( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Helper::normalize_card_type', $accepted_card_types ); $valid_networks = [ SV_WC_Payment_Gateway_Helper::CARD_TYPE_AMEX => 'AMEX', diff --git a/woocommerce/payment-gateway/External_Checkout/Orders.php b/woocommerce/payment-gateway/External_Checkout/Orders.php index 30acbb428..59038c244 100644 --- a/woocommerce/payment-gateway/External_Checkout/Orders.php +++ b/woocommerce/payment-gateway/External_Checkout/Orders.php @@ -22,9 +22,9 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10\Payment_Gateway\External_Checkout; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11\Payment_Gateway\External_Checkout; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10 as Framework; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11 as Framework; defined( 'ABSPATH' ) or exit; diff --git a/woocommerce/payment-gateway/External_Checkout/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api-request.php b/woocommerce/payment-gateway/External_Checkout/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api-request.php index 84f03df8f..2cf0321ac 100644 --- a/woocommerce/payment-gateway/External_Checkout/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api-request.php +++ b/woocommerce/payment-gateway/External_Checkout/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api-request.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Apple_Pay_API_Request' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Apple_Pay_API_Request' ) ) : /** diff --git a/woocommerce/payment-gateway/External_Checkout/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api-response.php b/woocommerce/payment-gateway/External_Checkout/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api-response.php index b4cc167da..6908a0dc9 100644 --- a/woocommerce/payment-gateway/External_Checkout/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api-response.php +++ b/woocommerce/payment-gateway/External_Checkout/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api-response.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Apple_Pay_API_Response' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Apple_Pay_API_Response' ) ) : /** diff --git a/woocommerce/payment-gateway/External_Checkout/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api.php b/woocommerce/payment-gateway/External_Checkout/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api.php index eb06335eb..676920f63 100644 --- a/woocommerce/payment-gateway/External_Checkout/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api.php +++ b/woocommerce/payment-gateway/External_Checkout/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Apple_Pay_API' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Apple_Pay_API' ) ) : /** @@ -57,7 +57,7 @@ public function __construct( SV_WC_Payment_Gateway $gateway ) { $this->set_request_content_type_header( 'application/json' ); $this->set_request_accept_header( 'application/json' ); - $this->set_response_handler( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Apple_Pay_API_Response' ); + $this->set_response_handler( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Apple_Pay_API_Response' ); } diff --git a/woocommerce/payment-gateway/External_Checkout/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-payment-response.php b/woocommerce/payment-gateway/External_Checkout/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-payment-response.php index 07296961c..82ece2f0c 100644 --- a/woocommerce/payment-gateway/External_Checkout/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-payment-response.php +++ b/woocommerce/payment-gateway/External_Checkout/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-payment-response.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Apple_Pay_Payment_Response' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Apple_Pay_Payment_Response' ) ) : /** diff --git a/woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php b/woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php index 12b5b32d5..ec15bf951 100755 --- a/woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php +++ b/woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php @@ -22,13 +22,13 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\Payment_Gateway\External_Checkout\Admin; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\Payment_Gateway\External_Checkout\Admin; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Apple_Pay_Admin' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Apple_Pay_Admin' ) ) : /** diff --git a/woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-ajax.php b/woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-ajax.php index 96a435eca..ab9928413 100644 --- a/woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-ajax.php +++ b/woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-ajax.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Apple_Pay_AJAX' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Apple_Pay_AJAX' ) ) : /** diff --git a/woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php b/woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php index 4ede88d55..e8009ef21 100644 --- a/woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php +++ b/woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Apple_Pay_Frontend' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Apple_Pay_Frontend' ) ) : /** @@ -34,7 +34,7 @@ * * @since 4.7.0 */ -class SV_WC_Payment_Gateway_Apple_Pay_Frontend extends \SkyVerge\WooCommerce\PluginFramework\v5_11_10\Payment_Gateway\External_Checkout\Frontend { +class SV_WC_Payment_Gateway_Apple_Pay_Frontend extends \SkyVerge\WooCommerce\PluginFramework\v5_11_11\Payment_Gateway\External_Checkout\Frontend { /** @var string JS handler base class name, without the FW version */ @@ -108,9 +108,9 @@ public function enqueue_scripts() { parent::enqueue_scripts(); - wp_enqueue_style( 'sv-wc-apple-pay-v5_11_10', $this->get_plugin()->get_payment_gateway_framework_assets_url() . '/css/frontend/sv-wc-payment-gateway-apple-pay.css', array(), $this->get_plugin()->get_version() ); // TODO: min + wp_enqueue_style( 'sv-wc-apple-pay-v5_11_11', $this->get_plugin()->get_payment_gateway_framework_assets_url() . '/css/frontend/sv-wc-payment-gateway-apple-pay.css', array(), $this->get_plugin()->get_version() ); // TODO: min - wp_enqueue_script( 'sv-wc-apple-pay-v5_11_10', $this->get_plugin()->get_payment_gateway_framework_assets_url() . '/dist/frontend/sv-wc-payment-gateway-apple-pay.js', array( 'jquery' ), $this->get_plugin()->get_version(), true ); + wp_enqueue_script( 'sv-wc-apple-pay-v5_11_11', $this->get_plugin()->get_payment_gateway_framework_assets_url() . '/dist/frontend/sv-wc-payment-gateway-apple-pay.js', array( 'jquery' ), $this->get_plugin()->get_version(), true ); } diff --git a/woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php b/woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php index 62cff1836..b92d4091b 100755 --- a/woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php +++ b/woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php @@ -22,13 +22,13 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\Payment_Gateway\External_Checkout\Orders; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\Payment_Gateway\External_Checkout\Orders; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Apple_Pay' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Apple_Pay' ) ) : /** @@ -940,7 +940,7 @@ public function get_supported_networks() { $accepted_card_types = ( $this->get_processing_gateway() ) ? $this->get_processing_gateway()->get_card_types() : array(); - $accepted_card_types = array_map( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Helper::normalize_card_type', $accepted_card_types ); + $accepted_card_types = array_map( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Helper::normalize_card_type', $accepted_card_types ); $valid_networks = array( SV_WC_Payment_Gateway_Helper::CARD_TYPE_AMEX => 'amex', diff --git a/woocommerce/payment-gateway/Handlers/Abstract_Hosted_Payment_Handler.php b/woocommerce/payment-gateway/Handlers/Abstract_Hosted_Payment_Handler.php index 7c4378d20..3597c6a30 100644 --- a/woocommerce/payment-gateway/Handlers/Abstract_Hosted_Payment_Handler.php +++ b/woocommerce/payment-gateway/Handlers/Abstract_Hosted_Payment_Handler.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10\Payment_Gateway\Handlers; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11\Payment_Gateway\Handlers; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10 as FrameworkBase; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11 as FrameworkBase; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\Payment_Gateway\\Handlers\\Abstract_Hosted_Payment_Handler' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\Payment_Gateway\\Handlers\\Abstract_Hosted_Payment_Handler' ) ) : /** diff --git a/woocommerce/payment-gateway/Handlers/Abstract_Payment_Handler.php b/woocommerce/payment-gateway/Handlers/Abstract_Payment_Handler.php index 7ff1b5448..5bff48a46 100644 --- a/woocommerce/payment-gateway/Handlers/Abstract_Payment_Handler.php +++ b/woocommerce/payment-gateway/Handlers/Abstract_Payment_Handler.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10\Payment_Gateway\Handlers; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11\Payment_Gateway\Handlers; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10 as FrameworkBase; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11 as FrameworkBase; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\Payment_Gateway\\Handlers\\Abstract_Payment_Handler' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\Payment_Gateway\\Handlers\\Abstract_Payment_Handler' ) ) : /** diff --git a/woocommerce/payment-gateway/Handlers/Capture.php b/woocommerce/payment-gateway/Handlers/Capture.php index 5c4a05d99..101bfc770 100644 --- a/woocommerce/payment-gateway/Handlers/Capture.php +++ b/woocommerce/payment-gateway/Handlers/Capture.php @@ -22,13 +22,13 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10\Payment_Gateway\Handlers; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11\Payment_Gateway\Handlers; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10 as Framework; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11 as Framework; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\Payment_Gateway\\Handlers\\Capture' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\Payment_Gateway\\Handlers\\Capture' ) ) : /** diff --git a/woocommerce/payment-gateway/admin/abstract-sv-wc-payment-gateway-plugin-admin-setup-wizard.php b/woocommerce/payment-gateway/admin/abstract-sv-wc-payment-gateway-plugin-admin-setup-wizard.php index c9edc269f..6a300ef18 100644 --- a/woocommerce/payment-gateway/admin/abstract-sv-wc-payment-gateway-plugin-admin-setup-wizard.php +++ b/woocommerce/payment-gateway/admin/abstract-sv-wc-payment-gateway-plugin-admin-setup-wizard.php @@ -21,13 +21,13 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10\Payment_Gateway\Admin; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11\Payment_Gateway\Admin; defined( 'ABSPATH' ) or exit; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10 as Framework; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11 as Framework; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\Payment_Gateway\\Admin\\Setup_Wizard' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\Payment_Gateway\\Admin\\Setup_Wizard' ) ) : /** diff --git a/woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php b/woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php index 597895e8b..1b9787f53 100644 --- a/woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php +++ b/woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Admin_Order' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Admin_Order' ) ) : /** diff --git a/woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php b/woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php index 2064e76b1..f6eefe67c 100644 --- a/woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php +++ b/woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Admin_Payment_Token_Editor' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Admin_Payment_Token_Editor' ) ) : /** diff --git a/woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php b/woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php index 991282abb..e8f867b0b 100644 --- a/woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php +++ b/woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Admin_User_Handler' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Admin_User_Handler' ) ) : /** diff --git a/woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php b/woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php index 657b3af40..9c8637d0a 100644 --- a/woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php +++ b/woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_API_Response_Message_Helper' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_API_Response_Message_Helper' ) ) : /** diff --git a/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-authorization-response.php b/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-authorization-response.php index f742b4dd5..06985d364 100644 --- a/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-authorization-response.php +++ b/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-authorization-response.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_API_Authorization_Response' ) ) : +if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_API_Authorization_Response' ) ) : /** diff --git a/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-create-payment-token-response.php b/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-create-payment-token-response.php index 0ba5f1741..20738b15a 100644 --- a/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-create-payment-token-response.php +++ b/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-create-payment-token-response.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_API_Create_Payment_Token_Response' ) ) : +if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_API_Create_Payment_Token_Response' ) ) : /** diff --git a/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-customer-response.php b/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-customer-response.php index 01ddcd814..398892b29 100644 --- a/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-customer-response.php +++ b/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-customer-response.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_API_Customer_Response' ) ) : +if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_API_Customer_Response' ) ) : /** diff --git a/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-get-tokenized-payment-methods-response.php b/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-get-tokenized-payment-methods-response.php index 9481b2fa4..30b05e46d 100644 --- a/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-get-tokenized-payment-methods-response.php +++ b/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-get-tokenized-payment-methods-response.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_API_Get_Tokenized_Payment_Methods_Response' ) ) : +if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_API_Get_Tokenized_Payment_Methods_Response' ) ) : /** diff --git a/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-credit-card-response.php b/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-credit-card-response.php index 3427fef44..61cd9983c 100644 --- a/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-credit-card-response.php +++ b/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-credit-card-response.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_API_Payment_Notification_Credit_Card_Response' ) ) : +if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_API_Payment_Notification_Credit_Card_Response' ) ) : /** diff --git a/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-echeck-response.php b/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-echeck-response.php index 243a227df..3cf6bb43a 100644 --- a/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-echeck-response.php +++ b/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-echeck-response.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_API_Payment_Notification_eCheck_Response' ) ) : +if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_API_Payment_Notification_eCheck_Response' ) ) : /** diff --git a/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-response.php b/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-response.php index a9afe0cbf..96d8d3323 100644 --- a/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-response.php +++ b/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-response.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_API_Payment_Notification_Response' ) ) : +if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_API_Payment_Notification_Response' ) ) : /** diff --git a/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-tokenization-response.php b/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-tokenization-response.php index ad4816d76..862e3bbef 100644 --- a/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-tokenization-response.php +++ b/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-tokenization-response.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Payment_Notification_Tokenization_Response' ) ) : +if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Payment_Notification_Tokenization_Response' ) ) : /** diff --git a/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-request.php b/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-request.php index c0f1b305e..7b1749125 100644 --- a/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-request.php +++ b/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-request.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_API_Request' ) ) : +if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_API_Request' ) ) : /** diff --git a/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-response.php b/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-response.php index 18a0d65fc..20d669b2a 100644 --- a/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-response.php +++ b/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-response.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_API_Response' ) ) : +if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_API_Response' ) ) : /** diff --git a/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api.php b/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api.php index f98ad8414..c1a0ca7ff 100644 --- a/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api.php +++ b/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_API' ) ) : +if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_API' ) ) : /** diff --git a/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-apple-pay.js b/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-apple-pay.js index 7e8f0135e..1dd743a76 100644 --- a/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-apple-pay.js +++ b/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-apple-pay.js @@ -1,4 +1,4 @@ parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c0&&void 0!==arguments[0]?arguments[0]:{};return this.block_ui(),this.get_payment_request(n).then(function(n){return e(t.button).show(),e(t.wrapper).show(),t.payment_request=JSON.parse(n),t.unblock_ui()},function(n){return console.error("[Apple Pay] Could not build payment request. "+n.message),e(t.button).hide(),1===e(t.container).children().length&&e(t.wrapper).hide(),t.unblock_ui()})}},{key:"get_payment_request",value:function(t){var n=this;return new Promise(function(i,o){var a;return a={action:"wc_".concat(n.gateway_id,"_apple_pay_get_payment_request")},e.extend(t,a),e.post(n.ajax_url,t,function(e){return e.success?i(e.data):o(e.data)})})}},{key:"render_errors",value:function(t){return e(".woocommerce-error, .woocommerce-message").remove(),this.ui_element.prepend('
  • '+t.join("
  • ")+"
"),this.ui_element.removeClass("processing").unblock(),e("html, body").animate({scrollTop:this.ui_element.offset().top-100},1e3)}},{key:"block_ui",value:function(){return this.ui_element.block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}},{key:"unblock_ui",value:function(){return this.ui_element.unblock()}}]),n}(),e(document.body).trigger("sv_wc_apple_pay_handler_v5_11_10_loaded")})}).call(this); +function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return this.block_ui(),this.get_payment_request(n).then(function(n){return e(t.button).show(),e(t.wrapper).show(),t.payment_request=JSON.parse(n),t.unblock_ui()},function(n){return console.error("[Apple Pay] Could not build payment request. "+n.message),e(t.button).hide(),1===e(t.container).children().length&&e(t.wrapper).hide(),t.unblock_ui()})}},{key:"get_payment_request",value:function(t){var n=this;return new Promise(function(i,o){var a;return a={action:"wc_".concat(n.gateway_id,"_apple_pay_get_payment_request")},e.extend(t,a),e.post(n.ajax_url,t,function(e){return e.success?i(e.data):o(e.data)})})}},{key:"render_errors",value:function(t){return e(".woocommerce-error, .woocommerce-message").remove(),this.ui_element.prepend('
  • '+t.join("
  • ")+"
"),this.ui_element.removeClass("processing").unblock(),e("html, body").animate({scrollTop:this.ui_element.offset().top-100},1e3)}},{key:"block_ui",value:function(){return this.ui_element.block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}},{key:"unblock_ui",value:function(){return this.ui_element.unblock()}}]),n}(),e(document.body).trigger("sv_wc_apple_pay_handler_v5_11_11_loaded")})}).call(this); },{}]},{},["L57g"], null) //# sourceMappingURL=../frontend/sv-wc-payment-gateway-apple-pay.js.map diff --git a/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-apple-pay.js.map b/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-apple-pay.js.map index e137ce56e..7be2f1896 100644 --- a/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-apple-pay.js.map +++ b/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-apple-pay.js.map @@ -1 +1 @@ -{"version":3,"sources":["frontend/sv-wc-payment-gateway-apple-pay.coffee"],"names":[],"mappings":";AASA,SAAA,EAAA,GAAA,OAAA,EAAA,mBAAA,QAAA,iBAAA,OAAA,SAAA,SAAA,GAAA,cAA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["###\n WooCommerce Apple Pay Handler\n Version 4.7.0\n\n Copyright (c) 2016, SkyVerge, Inc.\n Licensed under the GNU General Public License v3.0\n http://www.gnu.org/licenses/gpl-3.0.html\n###\n\njQuery ( $ ) ->\n\n\t\"use strict\"\n\n\t# The WooCommerce Apple Pay handler base class.\n\t#\n\t# @since 4.7.0\n\tclass window.SV_WC_Apple_Pay_Handler_v5_11_10\n\n\n\t\t# Constructs the handler.\n\t\t#\n\t\t# @since 4.7.0\n\t\tconstructor: (args) ->\n\n\t\t\t@gateway_id = args.gateway_id\n\t\t\t@gateway_slug = args.gateway_slug\n\t\t\t@merchant_id = args.merchant_id\n\t\t\t@ajax_url = args.ajax_url\n\t\t\t@validate_nonce = args.validate_nonce\n\t\t\t@recalculate_totals_nonce = args.recalculate_totals_nonce\n\t\t\t@process_nonce = args.process_nonce\n\t\t\t@payment_request = args.payment_request\n\t\t\t@generic_error = args.generic_error\n\n\t\t\t@wrapper = '.sv-wc-external-checkout'\n\t\t\t@container = '.buttons-container'\n\t\t\t@button = '.sv-wc-apple-pay-button'\n\n\n\t\t# Determines if Apple Pay is available.\n\t\t#\n\t\t# @since 4.7.0\n\t\t# @return bool\n\t\tis_available: ->\n\n\t\t\treturn false unless window.ApplePaySession\n\n\t\t\tApplePaySession.canMakePaymentsWithActiveCard( @merchant_id ).then ( canMakePayments ) =>\n\n\t\t\t\treturn canMakePayments\n\n\n\t\t# Initializes the handler.\n\t\t#\n\t\t# @since 4.7.0\n\t\tinit: ->\n\n\t\t\t# hide the wrapper if Apple Pay is the only button\n\t\t\tif $( @container ).children().length is 1\n\t\t\t\t$( @wrapper ).hide()\n\n\t\t\treturn unless this.is_available()\n\n\t\t\t# initialize for the various pages\n\t\t\tif $( 'form.cart' ).length\n\t\t\t\tthis.init_product_page()\n\t\t\telse if $( 'form.woocommerce-cart-form' ).length\n\t\t\t\tthis.init_cart_page()\n\t\t\telse if $( 'form.woocommerce-checkout' ).length\n\t\t\t\tthis.init_checkout_page()\n\n\t\t\t# bail if no UI was initialized\n\t\t\treturn unless @ui_element\n\n\t\t\tif @payment_request\n\t\t\t\t$( @button ).show()\n\t\t\t\t$( @wrapper ).show()\n\n\t\t\t$( document.body ).on 'click', '.sv-wc-apple-pay-button', ( e ) =>\n\n\t\t\t\te.preventDefault()\n\n\t\t\t\tthis.block_ui()\n\n\t\t\t\ttry\n\n\t\t\t\t\t@session = this.get_new_session( @payment_request )\n\n\t\t\t\t\t# set the payment card events\n\t\t\t\t\t@session.onvalidatemerchant = ( event ) => this.on_validate_merchant( event )\n\t\t\t\t\t@session.onpaymentmethodselected = ( event ) => this.on_payment_method_selected( event )\n\t\t\t\t\t@session.onshippingcontactselected = ( event ) => this.on_shipping_contact_selected( event )\n\t\t\t\t\t@session.onshippingmethodselected = ( event ) => this.on_shipping_method_selected( event )\n\t\t\t\t\t@session.onpaymentauthorized = ( event ) => this.on_payment_authorized( event )\n\t\t\t\t\t@session.oncancel = ( event ) => this.on_cancel_payment( event )\n\n\t\t\t\t\t@session.begin()\n\n\t\t\t\tcatch error\n\n\t\t\t\t\tthis.fail_payment( error )\n\n\n\t\t# Initializes the product page.\n\t\t#\n\t\t# @since 5.6.0\n\t\tinit_product_page: =>\n\n\t\t\t@ui_element = $( 'form.cart' )\n\n\n\t\t# Initializes the cart page.\n\t\t#\n\t\t# @since 5.6.0\n\t\tinit_cart_page: =>\n\n\t\t\t@ui_element = $( 'form.woocommerce-cart-form' ).parents( 'div.woocommerce' )\n\n\t\t\t# re-init if the cart totals are updated\n\t\t\t$( document.body ).on 'updated_cart_totals', =>\n\n\t\t\t\tthis.reset_payment_request()\n\n\n\t\t# Initializes the checkout page.\n\t\t#\n\t\t# @since 5.6.0\n\t\tinit_checkout_page: =>\n\n\t\t\t@ui_element = $( 'form.woocommerce-checkout' )\n\n\t\t\t$( document.body ).on 'updated_checkout', =>\n\n\t\t\t\t# re-init if the checkout is updated\n\t\t\t\tthis.reset_payment_request()\n\n\n\t\t# Gets a new Apple Pay session.\n\t\t#\n\t\t# @since 5.6.0\n\t\t#\n\t\t# @param [Object] payment_request payment request object\n\t\t# @return ApplePaySession\n\t\tget_new_session: ( payment_request ) ->\n\n\t\t\treturn new ApplePaySession( this.get_sdk_version(), payment_request )\n\n\n\t\t# Gets the Apple SDK version to use.\n\t\t#\n\t\t# @since 5.6.0\n\t\t# @return int\n\t\tget_sdk_version: ->\n\n\t\t\treturn 2\n\n\n\t\t# The callback for after the merchant data is validated.\n\t\t#\n\t\t# @since 4.7.0\n\t\ton_validate_merchant: ( event ) =>\n\n\t\t\tthis.validate_merchant( event.validationURL ).then ( merchant_session ) =>\n\n\t\t\t\tmerchant_session = JSON.parse( merchant_session )\n\n\t\t\t\t@session.completeMerchantValidation( merchant_session )\n\n\t\t\t, ( response ) =>\n\n\t\t\t\t@session.abort()\n\n\t\t\t\tthis.fail_payment 'Merchant could no be validated. ' + response.message\n\n\n\t\t# Validates the merchant data.\n\t\t#\n\t\t# @since 4.7.0\n\t\t# @return object\n\t\tvalidate_merchant: ( url ) => new Promise ( resolve, reject ) =>\n\n\t\t\tdata = {\n\t\t\t\t'action': \"wc_#{ @gateway_id }_apple_pay_validate_merchant\",\n\t\t\t\t'nonce': @validate_nonce,\n\t\t\t\t'merchant_id': @merchant_id,\n\t\t\t\t'url': url\n\t\t\t}\n\n\t\t\t# retrieve a payment request object\n\t\t\t$.post @ajax_url, data, ( response ) =>\n\n\t\t\t\tif response.success\n\t\t\t\t\tresolve response.data\n\t\t\t\telse\n\t\t\t\t\treject response.data\n\n\n\t\t# Fires after a payment method has been selected.\n\t\t#\n\t\t# @since 4.7.0\n\t\ton_payment_method_selected: ( event ) =>\n\n\t\t\tnew Promise ( resolve, reject ) =>\n\n\t\t\t\tdata = {\n\t\t\t\t\t'action': \"wc_#{ @gateway_id }_apple_pay_recalculate_totals\",\n\t\t\t\t\t'nonce': @recalculate_totals_nonce,\n\t\t\t\t}\n\n\t\t\t\t# retrieve a payment request object\n\t\t\t\t$.post @ajax_url, data, ( response ) =>\n\n\t\t\t\t\tif response.success\n\n\t\t\t\t\t\tdata = response.data\n\n\t\t\t\t\t\tresolve @session.completePaymentMethodSelection( data.total, data.line_items )\n\n\t\t\t\t\telse\n\n\t\t\t\t\t\tconsole.error '[Apple Pay] Error selecting a shipping contact. ' + response.data.message\n\n\t\t\t\t\t\treject @session.completePaymentMethodSelection( @payment_request.total, @payment_request.lineItems )\n\n\n\t\t# Fires after a shipping contact has been selected.\n\t\t#\n\t\t# @since 4.7.0\n\t\ton_shipping_contact_selected: ( event ) =>\n\n\t\t\tnew Promise ( resolve, reject ) =>\n\n\t\t\t\tdata = {\n\t\t\t\t\t'action': \"wc_#{ @gateway_id }_apple_pay_recalculate_totals\",\n\t\t\t\t\t'nonce': @recalculate_totals_nonce,\n\t\t\t\t\t'contact': event.shippingContact\n\t\t\t\t}\n\n\t\t\t\t# retrieve a payment request object\n\t\t\t\t$.post @ajax_url, data, ( response ) =>\n\n\t\t\t\t\tif response.success\n\n\t\t\t\t\t\tdata = response.data\n\n\t\t\t\t\t\tresolve @session.completeShippingContactSelection( ApplePaySession.STATUS_SUCCESS, data.shipping_methods, data.total, data.line_items )\n\n\t\t\t\t\telse\n\n\t\t\t\t\t\tconsole.error '[Apple Pay] Error selecting a shipping contact. ' + response.data.message\n\n\t\t\t\t\t\treject @session.completeShippingContactSelection( ApplePaySession.STATUS_FAILURE, [], @payment_request.total, @payment_request.lineItems )\n\n\n\t\t# Fires after a shipping method has been selected.\n\t\t#\n\t\t# @since 4.7.0\n\t\ton_shipping_method_selected: ( event ) =>\n\n\t\t\tnew Promise ( resolve, reject ) =>\n\n\t\t\t\tdata = {\n\t\t\t\t\t'action': \"wc_#{ @gateway_id }_apple_pay_recalculate_totals\",\n\t\t\t\t\t'nonce': @recalculate_totals_nonce,\n\t\t\t\t\t'method': event.shippingMethod.identifier\n\t\t\t\t}\n\n\t\t\t\t# retrieve a payment request object\n\t\t\t\t$.post @ajax_url, data, ( response ) =>\n\n\t\t\t\t\tif response.success\n\n\t\t\t\t\t\tdata = response.data\n\n\t\t\t\t\t\tresolve @session.completeShippingMethodSelection( ApplePaySession.STATUS_SUCCESS, data.total, data.line_items )\n\n\t\t\t\t\telse\n\n\t\t\t\t\t\tconsole.error '[Apple Pay] Error selecting a shipping method. ' + response.data.message\n\n\t\t\t\t\t\treject @session.completeShippingMethodSelection( ApplePaySession.STATUS_FAILURE, @payment_request.total, @payment_request.lineItems )\n\n\n\t\t# The callback for after the payment data is authorized.\n\t\t#\n\t\t# @since 4.7.0\n\t\ton_payment_authorized: ( event ) =>\n\n\t\t\tthis.process_authorization( event.payment ).then ( response ) =>\n\n\t\t\t\tthis.set_payment_status( true )\n\n\t\t\t\tthis.complete_purchase( response )\n\n\t\t\t, ( response ) =>\n\n\t\t\t\tthis.set_payment_status( false )\n\n\t\t\t\tthis.fail_payment 'Payment could no be processed. ' + response.message\n\n\n\t\t# Processes the transaction data.\n\t\t#\n\t\t# @since 4.7.0\n\t\tprocess_authorization: ( payment ) => new Promise ( resolve, reject ) =>\n\n\t\t\tdata = {\n\t\t\t\taction: \"wc_#{ @gateway_id }_apple_pay_process_payment\",\n\t\t\t\tnonce: @process_nonce,\n\t\t\t\tpayment: JSON.stringify( payment )\n\t\t\t}\n\n\t\t\t$.post @ajax_url, data, ( response ) =>\n\n\t\t\t\tif response.success\n\t\t\t\t\tresolve response.data\n\t\t\t\telse\n\t\t\t\t\treject response.data\n\n\n\t\t# The callback for when the payment card is cancelled/dismissed.\n\t\t#\n\t\t# @since 4.7.0\n\t\ton_cancel_payment: ( event ) =>\n\n\t\t\tthis.unblock_ui()\n\n\n\t\t# Completes the purchase based on the gateway result.\n\t\t#\n\t\t# @since 4.7.0\n\t\tcomplete_purchase: ( response ) ->\n\n\t\t\twindow.location = response.redirect\n\n\n\t\t# Fails the purchase based on the gateway result.\n\t\t#\n\t\t# @since 4.7.0\n\t\tfail_payment: ( error ) ->\n\n\t\t\tconsole.error '[Apple Pay] ' + error\n\n\t\t\tthis.unblock_ui()\n\n\t\t\tthis.render_errors( [ @generic_error ] )\n\n\n\t\t# Sets the Apple Pay payment status depending on the gateway result.\n\t\t#\n\t\t# @since 4.7.0\n\t\tset_payment_status: ( success ) ->\n\n\t\t\tif success\n\t\t\t\tstatus = ApplePaySession.STATUS_SUCCESS\n\t\t\telse\n\t\t\t\tstatus = ApplePaySession.STATUS_FAILURE\n\n\t\t\t@session.completePayment( status )\n\n\n\t\t# Resets the payment request via AJAX.\n\t\t#\n\t\t# Extending handlers can call this on change events to refresh the data.\n\t\t#\n\t\t# @since 4.7.0\n\t\treset_payment_request: ( data = {} ) =>\n\n\t\t\tthis.block_ui()\n\n\t\t\tthis.get_payment_request( data ).then ( response ) =>\n\n\t\t\t\t$( @button ).show()\n\t\t\t\t$( @wrapper ).show()\n\n\t\t\t\t@payment_request = JSON.parse( response )\n\n\t\t\t\tthis.unblock_ui()\n\n\t\t\t, ( response ) =>\n\n\t\t\t\tconsole.error '[Apple Pay] Could not build payment request. ' + response.message\n\n\t\t\t\t$( @button ).hide()\n\t\t\t\t# hide the wrapper if Apple Pay is the only button\n\t\t\t\tif $( @container ).children().length is 1\n\t\t\t\t\t$( @wrapper ).hide()\n\n\t\t\t\tthis.unblock_ui()\n\n\n\t\t# Gets the payment request via AJAX.\n\t\t#\n\t\t# @since 4.7.0\n\t\tget_payment_request: ( data ) => new Promise ( resolve, reject ) =>\n\n\t\t\tbase_data = {\n\t\t\t\t'action': \"wc_#{ @gateway_id }_apple_pay_get_payment_request\"\n\t\t\t}\n\n\t\t\t$.extend data, base_data\n\n\t\t\t# retrieve a payment request object\n\t\t\t$.post @ajax_url, data, ( response ) =>\n\n\t\t\t\tif response.success\n\t\t\t\t\tresolve response.data\n\t\t\t\telse\n\t\t\t\t\treject response.data\n\n\n\t\t# Renders any new errors and bring them into the viewport.\n\t\t#\n\t\t# @since 4.7.0\n\t\trender_errors: ( errors ) ->\n\n\t\t\t# hide and remove any previous errors\n\t\t\t$( '.woocommerce-error, .woocommerce-message' ).remove()\n\n\t\t\t# add errors\n\t\t\t@ui_element.prepend '
  • ' + errors.join( '
  • ' ) + '
'\n\n\t\t\t# unblock UI\n\t\t\t@ui_element.removeClass( 'processing' ).unblock()\n\n\t\t\t# scroll to top\n\t\t\t$( 'html, body' ).animate( { scrollTop: @ui_element.offset().top - 100 }, 1000 )\n\n\n\t\t# Blocks the payment form UI.\n\t\t#\n\t\t# @since 4.7.0\n\t\tblock_ui: -> @ui_element.block( message: null, overlayCSS: background: '#fff', opacity: 0.6 )\n\n\n\t\t# Unblocks the payment form UI.\n\t\t#\n\t\t# @since 4.7.0\n\t\tunblock_ui: -> @ui_element.unblock()\n\n\n\t# dispatch loaded event\n\t$( document.body ).trigger( 'sv_wc_apple_pay_handler_v5_11_10_loaded' )\n"]} +{"version":3,"sources":["frontend/sv-wc-payment-gateway-apple-pay.coffee"],"names":[],"mappings":";AASA,SAAA,EAAA,GAAA,OAAA,EAAA,mBAAA,QAAA,iBAAA,OAAA,SAAA,SAAA,GAAA,cAAA,GAAA,SAAA,GAAA,OAAA,GAAA,mBAAA,QAAA,EAAA,cAAA,QAAA,IAAA,OAAA,UAAA,gBAAA,IAAA,GAAA,SAAA,EAAA,EAAA,GAAA,KAAA,aAAA,GAAA,MAAA,IAAA,UAAA,qCAAA,SAAA,EAAA,EAAA,GAAA,IAAA,IAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,CAAA,IAAA,EAAA,EAAA,GAAA,EAAA,WAAA,EAAA,aAAA,EAAA,EAAA,cAAA,EAAA,UAAA,IAAA,EAAA,UAAA,GAAA,OAAA,eAAA,EAAA,EAAA,EAAA,KAAA,IAAA,SAAA,EAAA,EAAA,EAAA,GAAA,OAAA,GAAA,EAAA,EAAA,UAAA,GAAA,GAAA,EAAA,EAAA,GAAA,OAAA,eAAA,EAAA,YAAA,CAAA,UAAA,IAAA,EAAA,SAAA,EAAA,GAAA,IAAA,EAAA,EAAA,EAAA,UAAA,MAAA,WAAA,EAAA,GAAA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,WAAR,mCAGX,EAAE,OAAO,EAAM,GAGf,EAAE,KAAK,EAAC,SAAU,EAAM,SAAE,GAEzB,OAAG,EAAS,QACX,EAAQ,EAAS,MAEjB,EAAO,EAAS,YA/YrB,CAAA,IAAA,gBAqZE,MAAA,SAAiB,GAYhB,OATA,EAAG,4CAA6C,SAGhD,KAAC,WAAW,QAAQ,qCAAuC,EAAO,KAAM,aAAgB,cAGxF,KAAC,WAAW,YAAa,cAAe,UAGxC,EAAG,cAAe,QAAS,CAAE,UAAW,KAAC,WAAW,SAAS,IAAM,KAAO,OAja7E,CAAA,IAAA,WAuaE,MAAA,WAAa,OAAA,KAAC,WAAW,MAAO,CAAA,QAAS,KAAM,WAAY,CAAA,WAAY,OAAQ,QAAS,QAva1F,CAAA,IAAA,aA6aE,MAAA,WAAe,OAAA,KAAC,WAAW,cAAf,EAtaA,GA0ab,EAAG,SAAS,MAAO,QAAS,8CAjb7B,KAAA","file":"sv-wc-payment-gateway-apple-pay.js","sourceRoot":"../js","sourcesContent":["###\n WooCommerce Apple Pay Handler\n Version 4.7.0\n\n Copyright (c) 2016, SkyVerge, Inc.\n Licensed under the GNU General Public License v3.0\n http://www.gnu.org/licenses/gpl-3.0.html\n###\n\njQuery ( $ ) ->\n\n\t\"use strict\"\n\n\t# The WooCommerce Apple Pay handler base class.\n\t#\n\t# @since 4.7.0\n\tclass window.SV_WC_Apple_Pay_Handler_v5_11_11\n\n\n\t\t# Constructs the handler.\n\t\t#\n\t\t# @since 4.7.0\n\t\tconstructor: (args) ->\n\n\t\t\t@gateway_id = args.gateway_id\n\t\t\t@gateway_slug = args.gateway_slug\n\t\t\t@merchant_id = args.merchant_id\n\t\t\t@ajax_url = args.ajax_url\n\t\t\t@validate_nonce = args.validate_nonce\n\t\t\t@recalculate_totals_nonce = args.recalculate_totals_nonce\n\t\t\t@process_nonce = args.process_nonce\n\t\t\t@payment_request = args.payment_request\n\t\t\t@generic_error = args.generic_error\n\n\t\t\t@wrapper = '.sv-wc-external-checkout'\n\t\t\t@container = '.buttons-container'\n\t\t\t@button = '.sv-wc-apple-pay-button'\n\n\n\t\t# Determines if Apple Pay is available.\n\t\t#\n\t\t# @since 4.7.0\n\t\t# @return bool\n\t\tis_available: ->\n\n\t\t\treturn false unless window.ApplePaySession\n\n\t\t\tApplePaySession.canMakePaymentsWithActiveCard( @merchant_id ).then ( canMakePayments ) =>\n\n\t\t\t\treturn canMakePayments\n\n\n\t\t# Initializes the handler.\n\t\t#\n\t\t# @since 4.7.0\n\t\tinit: ->\n\n\t\t\t# hide the wrapper if Apple Pay is the only button\n\t\t\tif $( @container ).children().length is 1\n\t\t\t\t$( @wrapper ).hide()\n\n\t\t\treturn unless this.is_available()\n\n\t\t\t# initialize for the various pages\n\t\t\tif $( 'form.cart' ).length\n\t\t\t\tthis.init_product_page()\n\t\t\telse if $( 'form.woocommerce-cart-form' ).length\n\t\t\t\tthis.init_cart_page()\n\t\t\telse if $( 'form.woocommerce-checkout' ).length\n\t\t\t\tthis.init_checkout_page()\n\n\t\t\t# bail if no UI was initialized\n\t\t\treturn unless @ui_element\n\n\t\t\tif @payment_request\n\t\t\t\t$( @button ).show()\n\t\t\t\t$( @wrapper ).show()\n\n\t\t\t$( document.body ).on 'click', '.sv-wc-apple-pay-button', ( e ) =>\n\n\t\t\t\te.preventDefault()\n\n\t\t\t\tthis.block_ui()\n\n\t\t\t\ttry\n\n\t\t\t\t\t@session = this.get_new_session( @payment_request )\n\n\t\t\t\t\t# set the payment card events\n\t\t\t\t\t@session.onvalidatemerchant = ( event ) => this.on_validate_merchant( event )\n\t\t\t\t\t@session.onpaymentmethodselected = ( event ) => this.on_payment_method_selected( event )\n\t\t\t\t\t@session.onshippingcontactselected = ( event ) => this.on_shipping_contact_selected( event )\n\t\t\t\t\t@session.onshippingmethodselected = ( event ) => this.on_shipping_method_selected( event )\n\t\t\t\t\t@session.onpaymentauthorized = ( event ) => this.on_payment_authorized( event )\n\t\t\t\t\t@session.oncancel = ( event ) => this.on_cancel_payment( event )\n\n\t\t\t\t\t@session.begin()\n\n\t\t\t\tcatch error\n\n\t\t\t\t\tthis.fail_payment( error )\n\n\n\t\t# Initializes the product page.\n\t\t#\n\t\t# @since 5.6.0\n\t\tinit_product_page: =>\n\n\t\t\t@ui_element = $( 'form.cart' )\n\n\n\t\t# Initializes the cart page.\n\t\t#\n\t\t# @since 5.6.0\n\t\tinit_cart_page: =>\n\n\t\t\t@ui_element = $( 'form.woocommerce-cart-form' ).parents( 'div.woocommerce' )\n\n\t\t\t# re-init if the cart totals are updated\n\t\t\t$( document.body ).on 'updated_cart_totals', =>\n\n\t\t\t\tthis.reset_payment_request()\n\n\n\t\t# Initializes the checkout page.\n\t\t#\n\t\t# @since 5.6.0\n\t\tinit_checkout_page: =>\n\n\t\t\t@ui_element = $( 'form.woocommerce-checkout' )\n\n\t\t\t$( document.body ).on 'updated_checkout', =>\n\n\t\t\t\t# re-init if the checkout is updated\n\t\t\t\tthis.reset_payment_request()\n\n\n\t\t# Gets a new Apple Pay session.\n\t\t#\n\t\t# @since 5.6.0\n\t\t#\n\t\t# @param [Object] payment_request payment request object\n\t\t# @return ApplePaySession\n\t\tget_new_session: ( payment_request ) ->\n\n\t\t\treturn new ApplePaySession( this.get_sdk_version(), payment_request )\n\n\n\t\t# Gets the Apple SDK version to use.\n\t\t#\n\t\t# @since 5.6.0\n\t\t# @return int\n\t\tget_sdk_version: ->\n\n\t\t\treturn 2\n\n\n\t\t# The callback for after the merchant data is validated.\n\t\t#\n\t\t# @since 4.7.0\n\t\ton_validate_merchant: ( event ) =>\n\n\t\t\tthis.validate_merchant( event.validationURL ).then ( merchant_session ) =>\n\n\t\t\t\tmerchant_session = JSON.parse( merchant_session )\n\n\t\t\t\t@session.completeMerchantValidation( merchant_session )\n\n\t\t\t, ( response ) =>\n\n\t\t\t\t@session.abort()\n\n\t\t\t\tthis.fail_payment 'Merchant could no be validated. ' + response.message\n\n\n\t\t# Validates the merchant data.\n\t\t#\n\t\t# @since 4.7.0\n\t\t# @return object\n\t\tvalidate_merchant: ( url ) => new Promise ( resolve, reject ) =>\n\n\t\t\tdata = {\n\t\t\t\t'action': \"wc_#{ @gateway_id }_apple_pay_validate_merchant\",\n\t\t\t\t'nonce': @validate_nonce,\n\t\t\t\t'merchant_id': @merchant_id,\n\t\t\t\t'url': url\n\t\t\t}\n\n\t\t\t# retrieve a payment request object\n\t\t\t$.post @ajax_url, data, ( response ) =>\n\n\t\t\t\tif response.success\n\t\t\t\t\tresolve response.data\n\t\t\t\telse\n\t\t\t\t\treject response.data\n\n\n\t\t# Fires after a payment method has been selected.\n\t\t#\n\t\t# @since 4.7.0\n\t\ton_payment_method_selected: ( event ) =>\n\n\t\t\tnew Promise ( resolve, reject ) =>\n\n\t\t\t\tdata = {\n\t\t\t\t\t'action': \"wc_#{ @gateway_id }_apple_pay_recalculate_totals\",\n\t\t\t\t\t'nonce': @recalculate_totals_nonce,\n\t\t\t\t}\n\n\t\t\t\t# retrieve a payment request object\n\t\t\t\t$.post @ajax_url, data, ( response ) =>\n\n\t\t\t\t\tif response.success\n\n\t\t\t\t\t\tdata = response.data\n\n\t\t\t\t\t\tresolve @session.completePaymentMethodSelection( data.total, data.line_items )\n\n\t\t\t\t\telse\n\n\t\t\t\t\t\tconsole.error '[Apple Pay] Error selecting a shipping contact. ' + response.data.message\n\n\t\t\t\t\t\treject @session.completePaymentMethodSelection( @payment_request.total, @payment_request.lineItems )\n\n\n\t\t# Fires after a shipping contact has been selected.\n\t\t#\n\t\t# @since 4.7.0\n\t\ton_shipping_contact_selected: ( event ) =>\n\n\t\t\tnew Promise ( resolve, reject ) =>\n\n\t\t\t\tdata = {\n\t\t\t\t\t'action': \"wc_#{ @gateway_id }_apple_pay_recalculate_totals\",\n\t\t\t\t\t'nonce': @recalculate_totals_nonce,\n\t\t\t\t\t'contact': event.shippingContact\n\t\t\t\t}\n\n\t\t\t\t# retrieve a payment request object\n\t\t\t\t$.post @ajax_url, data, ( response ) =>\n\n\t\t\t\t\tif response.success\n\n\t\t\t\t\t\tdata = response.data\n\n\t\t\t\t\t\tresolve @session.completeShippingContactSelection( ApplePaySession.STATUS_SUCCESS, data.shipping_methods, data.total, data.line_items )\n\n\t\t\t\t\telse\n\n\t\t\t\t\t\tconsole.error '[Apple Pay] Error selecting a shipping contact. ' + response.data.message\n\n\t\t\t\t\t\treject @session.completeShippingContactSelection( ApplePaySession.STATUS_FAILURE, [], @payment_request.total, @payment_request.lineItems )\n\n\n\t\t# Fires after a shipping method has been selected.\n\t\t#\n\t\t# @since 4.7.0\n\t\ton_shipping_method_selected: ( event ) =>\n\n\t\t\tnew Promise ( resolve, reject ) =>\n\n\t\t\t\tdata = {\n\t\t\t\t\t'action': \"wc_#{ @gateway_id }_apple_pay_recalculate_totals\",\n\t\t\t\t\t'nonce': @recalculate_totals_nonce,\n\t\t\t\t\t'method': event.shippingMethod.identifier\n\t\t\t\t}\n\n\t\t\t\t# retrieve a payment request object\n\t\t\t\t$.post @ajax_url, data, ( response ) =>\n\n\t\t\t\t\tif response.success\n\n\t\t\t\t\t\tdata = response.data\n\n\t\t\t\t\t\tresolve @session.completeShippingMethodSelection( ApplePaySession.STATUS_SUCCESS, data.total, data.line_items )\n\n\t\t\t\t\telse\n\n\t\t\t\t\t\tconsole.error '[Apple Pay] Error selecting a shipping method. ' + response.data.message\n\n\t\t\t\t\t\treject @session.completeShippingMethodSelection( ApplePaySession.STATUS_FAILURE, @payment_request.total, @payment_request.lineItems )\n\n\n\t\t# The callback for after the payment data is authorized.\n\t\t#\n\t\t# @since 4.7.0\n\t\ton_payment_authorized: ( event ) =>\n\n\t\t\tthis.process_authorization( event.payment ).then ( response ) =>\n\n\t\t\t\tthis.set_payment_status( true )\n\n\t\t\t\tthis.complete_purchase( response )\n\n\t\t\t, ( response ) =>\n\n\t\t\t\tthis.set_payment_status( false )\n\n\t\t\t\tthis.fail_payment 'Payment could no be processed. ' + response.message\n\n\n\t\t# Processes the transaction data.\n\t\t#\n\t\t# @since 4.7.0\n\t\tprocess_authorization: ( payment ) => new Promise ( resolve, reject ) =>\n\n\t\t\tdata = {\n\t\t\t\taction: \"wc_#{ @gateway_id }_apple_pay_process_payment\",\n\t\t\t\tnonce: @process_nonce,\n\t\t\t\tpayment: JSON.stringify( payment )\n\t\t\t}\n\n\t\t\t$.post @ajax_url, data, ( response ) =>\n\n\t\t\t\tif response.success\n\t\t\t\t\tresolve response.data\n\t\t\t\telse\n\t\t\t\t\treject response.data\n\n\n\t\t# The callback for when the payment card is cancelled/dismissed.\n\t\t#\n\t\t# @since 4.7.0\n\t\ton_cancel_payment: ( event ) =>\n\n\t\t\tthis.unblock_ui()\n\n\n\t\t# Completes the purchase based on the gateway result.\n\t\t#\n\t\t# @since 4.7.0\n\t\tcomplete_purchase: ( response ) ->\n\n\t\t\twindow.location = response.redirect\n\n\n\t\t# Fails the purchase based on the gateway result.\n\t\t#\n\t\t# @since 4.7.0\n\t\tfail_payment: ( error ) ->\n\n\t\t\tconsole.error '[Apple Pay] ' + error\n\n\t\t\tthis.unblock_ui()\n\n\t\t\tthis.render_errors( [ @generic_error ] )\n\n\n\t\t# Sets the Apple Pay payment status depending on the gateway result.\n\t\t#\n\t\t# @since 4.7.0\n\t\tset_payment_status: ( success ) ->\n\n\t\t\tif success\n\t\t\t\tstatus = ApplePaySession.STATUS_SUCCESS\n\t\t\telse\n\t\t\t\tstatus = ApplePaySession.STATUS_FAILURE\n\n\t\t\t@session.completePayment( status )\n\n\n\t\t# Resets the payment request via AJAX.\n\t\t#\n\t\t# Extending handlers can call this on change events to refresh the data.\n\t\t#\n\t\t# @since 4.7.0\n\t\treset_payment_request: ( data = {} ) =>\n\n\t\t\tthis.block_ui()\n\n\t\t\tthis.get_payment_request( data ).then ( response ) =>\n\n\t\t\t\t$( @button ).show()\n\t\t\t\t$( @wrapper ).show()\n\n\t\t\t\t@payment_request = JSON.parse( response )\n\n\t\t\t\tthis.unblock_ui()\n\n\t\t\t, ( response ) =>\n\n\t\t\t\tconsole.error '[Apple Pay] Could not build payment request. ' + response.message\n\n\t\t\t\t$( @button ).hide()\n\t\t\t\t# hide the wrapper if Apple Pay is the only button\n\t\t\t\tif $( @container ).children().length is 1\n\t\t\t\t\t$( @wrapper ).hide()\n\n\t\t\t\tthis.unblock_ui()\n\n\n\t\t# Gets the payment request via AJAX.\n\t\t#\n\t\t# @since 4.7.0\n\t\tget_payment_request: ( data ) => new Promise ( resolve, reject ) =>\n\n\t\t\tbase_data = {\n\t\t\t\t'action': \"wc_#{ @gateway_id }_apple_pay_get_payment_request\"\n\t\t\t}\n\n\t\t\t$.extend data, base_data\n\n\t\t\t# retrieve a payment request object\n\t\t\t$.post @ajax_url, data, ( response ) =>\n\n\t\t\t\tif response.success\n\t\t\t\t\tresolve response.data\n\t\t\t\telse\n\t\t\t\t\treject response.data\n\n\n\t\t# Renders any new errors and bring them into the viewport.\n\t\t#\n\t\t# @since 4.7.0\n\t\trender_errors: ( errors ) ->\n\n\t\t\t# hide and remove any previous errors\n\t\t\t$( '.woocommerce-error, .woocommerce-message' ).remove()\n\n\t\t\t# add errors\n\t\t\t@ui_element.prepend '
  • ' + errors.join( '
  • ' ) + '
'\n\n\t\t\t# unblock UI\n\t\t\t@ui_element.removeClass( 'processing' ).unblock()\n\n\t\t\t# scroll to top\n\t\t\t$( 'html, body' ).animate( { scrollTop: @ui_element.offset().top - 100 }, 1000 )\n\n\n\t\t# Blocks the payment form UI.\n\t\t#\n\t\t# @since 4.7.0\n\t\tblock_ui: -> @ui_element.block( message: null, overlayCSS: background: '#fff', opacity: 0.6 )\n\n\n\t\t# Unblocks the payment form UI.\n\t\t#\n\t\t# @since 4.7.0\n\t\tunblock_ui: -> @ui_element.unblock()\n\n\n\t# dispatch loaded event\n\t$( document.body ).trigger( 'sv_wc_apple_pay_handler_v5_11_11_loaded' )\n"]} diff --git a/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-google-pay.js b/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-google-pay.js index f587e74c4..46da868ae 100644 --- a/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-google-pay.js +++ b/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-google-pay.js @@ -1,4 +1,4 @@ parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c
  • '+t.join("
  • ")+"
  • "),this.uiElement.removeClass("processing").unblock(),e("html, body").animate({scrollTop:this.uiElement.offset().top-100},1e3)}},{key:"blockUI",value:function(){this.uiElement.block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}},{key:"unblockUI",value:function(){this.uiElement.unblock()}}]),n}(),e(document.body).trigger("sv_wc_google_pay_handler_v5_11_10_loaded")}); +function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n
  • '+t.join("
  • ")+"
  • "),this.uiElement.removeClass("processing").unblock(),e("html, body").animate({scrollTop:this.uiElement.offset().top-100},1e3)}},{key:"blockUI",value:function(){this.uiElement.block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}},{key:"unblockUI",value:function(){this.uiElement.unblock()}}]),n}(),e(document.body).trigger("sv_wc_google_pay_handler_v5_11_11_loaded")}); },{}]},{},["O8A1"], null) //# sourceMappingURL=../frontend/sv-wc-payment-gateway-google-pay.js.map diff --git a/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-google-pay.js.map b/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-google-pay.js.map index f1e78a174..3abc7812d 100644 --- a/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-google-pay.js.map +++ b/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-google-pay.js.map @@ -1 +1 @@ -{"version":3,"sources":["frontend/sv-wc-payment-gateway-google-pay.js"],"names":["jQuery","$","window","SV_WC_Google_Pay_Handler_v5_11_10","params","_classCallCheck","plugin_id","merchant_id","merchant_name","gateway_id","environment","gateway_id_dasherized","ajax_url","recalculate_totals_nonce","process_nonce","button_style","card_types","available_countries","currency_code","needs_shipping","generic_error","gatewayID","merchantID","merchantName","ajaxURL","recalculateTotalsNonce","processNonce","buttonStyle","availableCountries","currencyCode","needsShipping","genericError","product_id","productID","allowedCardNetworks","baseRequest","apiVersion","apiVersionMinor","tokenizationSpecification","type","parameters","baseCardPaymentMethod","allowedAuthMethods","billingAddressRequired","billingAddressParameters","format","phoneNumberRequired","cardPaymentMethod","Object","assign","paymentsClient","_createClass","key","value","allowedPaymentMethods","resolve","_this","getGoogleTransactionInfo","transactionInfo","paymentDataRequest","merchantInfo","merchantId","emailRequired","callbackIntents","shippingAddressRequired","shippingAddressParameters","getGoogleShippingAddressParameters","shippingOptionRequired","_this2","args","paymentDataCallbacks","onPaymentAuthorized","paymentData","onPaymentDataChanged","google","payments","api","PaymentsClient","_this3","blockUI","Promise","reject","processPayment","err","transactionState","error","intent","message","reason","unblockUI","intermediatePaymentData","_this4","shippingAddress","shippingOptionData","chosenShippingMethod","callbackTrigger","id","getUpdatedTotals","paymentDataRequestUpdate","newShippingOptionParameters","shippingOptions","length","getGoogleUnserviceableAddressError","failPayment","_this5","data","action","concat","post","response","success","JSON","parse","shippingMethod","_this6","allowedCountryCodes","_this7","button","getGooglePaymentsClient","createButton","onClick","event","onGooglePaymentButtonClicked","buttonColor","buttonSizeMode","document","getElementById","appendChild","_this8","getGooglePaymentDataRequest","totalPriceStatus","prefetchPaymentData","_this9","nonce","stringify","location","redirect","_this10","preventDefault","loadPaymentData","initProductPage","initCartPage","initCheckoutPage","initGooglePay","_this11","isReadyToPay","getGoogleIsReadyToPayRequest","then","result","addGooglePayButton","prefetchGooglePaymentData","catch","uiElement","_this12","parents","body","on","console","renderErrors","errors","remove","prepend","join","removeClass","unblock","animate","scrollTop","offset","top","block","overlayCSS","background","opacity","trigger"],"mappings":";AAqmBG,SAAA,EAAA,GAAA,OAAA,EAAA,mBAAA,QAAA,iBAAA,OAAA,SAAA,SAAA,GAAA,cAAA,GAAA,SAAA,GAAA,OAAA,GAAA,mBAAA,QAAA,EAAA,cAAA,QAAA,IAAA,OAAA,UAAA,gBAAA,IAAA,GAAA,SAAA,EAAA,EAAA,GAAA,KAAA,aAAA,GAAA,MAAA,IAAA,UAAA,qCAAA,SAAA,EAAA,EAAA,GAAA,IAAA,IAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,CAAA,IAAA,EAAA,EAAA,GAAA,EAAA,WAAA,EAAA,aAAA,EAAA,EAAA,cAAA,EAAA,UAAA,IAAA,EAAA,UAAA,GAAA,OAAA,eAAA,EAAA,EAAA,EAAA,KAAA,IAAA,SAAA,EAAA,EAAA,EAAA,GAAA,OAAA,GAAA,EAAA,EAAA,UAAA,GAAA,GAAA,EAAA,EAAA,GAAA,OAAA,eAAA,EAAA,YAAA,CAAA,UAAA,IAAA,EAAA,SAAA,EAAA,GAAA,IAAA,EAAA,EAAA,EAAA,UAAA,MAAA,WAAA,EAAA,GAAA,EAAA,OAAA,GAAA,SAAA,EAAA,EAAA,GAAA,GAAA,WAAA,EAAA,IAAA,OAAA,EAAA,OAAA,E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cAG5F,KAAKV,UAAUW,YAAa,cAAeC,UAG3CnK,EAAG,cAAeoK,QAAS,CAAEC,UAAW,KAAKd,UAAUe,SAASC,IAAM,KAAO,OAG9E,CAAApH,IAAA,UAAAC,MAGA,WACC,KAAKmG,UAAUiB,MAAO,CAAElF,QAAS,KAAMmF,WAAY,CAAEC,WAAY,OAAQC,QAAS,QAGnF,CAAAxH,IAAA,YAAAC,MAGA,WACC,KAAKmG,UAAUY,cACfjK,EArlBqC,GAwlBvCF,EAAG4H,SAAS8B,MAAOkB,QAAS","file":"sv-wc-payment-gateway-google-pay.js","sourceRoot":"../js","sourcesContent":["jQuery( function( $ ) {\n\n\t\"use strict\"\n\n\t/**\n\t * Google Pay handler.\n\t *\n\t * @since 5.10.0\n\t *\n\t * @type {SV_WC_Google_Pay_Handler_v5_11_10} object\n\t */\n\twindow.SV_WC_Google_Pay_Handler_v5_11_10 = class SV_WC_Google_Pay_Handler_v5_11_10 {\n\n\t\t/**\n\t\t * Handler constructor.\n\t\t *\n\t\t * @since 5.10.0\n\t\t *\n\t\t * @param {Object} params The plugin ID\n\t\t * @param {string} params.plugin_id The plugin ID\n\t\t * @param {string} params.merchant_id The merchant ID\n\t\t * @param {string} params.merchant_name The site name\n\t\t * @param {string} params.gateway_id The gateway ID\n\t\t * @param {string} params.gateway_id_dasherized The gateway ID dasherized\n\t\t * @param {string} params.environment The gateway environment (PRODUCTION or TEST)\n\t\t * @param {string} params.ajax_url The AJAX URL\n\t\t * @param {string} params.recalculate_totals_nonce Nonce for the recalculate_totals AJAX action\n\t\t * @param {string} params.process_nonce Nonce for the process AJAX action\n\t\t * @param {string} params.button_style The button style\n\t\t * @param {string[]} params.card_types The supported card types\n\t\t * @param {string[]} params.available_countries Array of two-letter country codes the gateway is available for\n\t\t * @param {string[]} params.currency_code WC configured currency\n\t\t * @param {boolean} params.needs_shipping Whether or not the cart or product needs shipping\n\t\t * @param {string} params.generic_error The generic error message\n\t\t * @param {string} params.product_id The product ID if we are on a Product page\n\t\t */\n\t\tconstructor( params ) {\n\n\t\t\tlet {\n\t\t\t\tplugin_id,\n\t\t\t\tmerchant_id,\n\t\t\t\tmerchant_name,\n\t\t\t\tgateway_id,\n\t\t\t\tgateway_id_dasherized,\n\t\t\t\tenvironment,\n\t\t\t\tajax_url,\n\t\t\t\trecalculate_totals_nonce,\n\t\t\t\tprocess_nonce,\n\t\t\t\tbutton_style,\n\t\t\t\tcard_types,\n\t\t\t\tavailable_countries,\n\t\t\t\tcurrency_code,\n\t\t\t\tneeds_shipping,\n\t\t\t\tgeneric_error\n\t\t\t} = params;\n\n\t\t\tthis.gatewayID = gateway_id;\n\t\t\tthis.merchantID = merchant_id;\n\t\t\tthis.merchantName = merchant_name;\n\t\t\tthis.environment = environment;\n\t\t\tthis.ajaxURL = ajax_url;\n\t\t\tthis.recalculateTotalsNonce = recalculate_totals_nonce;\n\t\t\tthis.processNonce = process_nonce;\n\t\t\tthis.buttonStyle = button_style;\n\t\t\tthis.availableCountries = available_countries;\n\t\t\tthis.currencyCode = currency_code;\n\t\t\tthis.needsShipping = needs_shipping;\n\t\t\tthis.genericError = generic_error;\n\n\t\t\tif ( params.product_id ) {\n\t\t\t\tthis.productID = params.product_id;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Card networks supported by your site and your gateway\n\t\t\t *\n\t\t\t * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}\n\t\t\t */\n\t\t\tconst allowedCardNetworks = card_types;\n\n\t\t\t/**\n\t\t\t * Define the version of the Google Pay API referenced when creating your configuration\n\t\t\t *\n\t\t\t * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest|apiVersion in PaymentDataRequest}\n\t\t\t */\n\t\t\tthis.baseRequest = {\n\t\t\t\tapiVersion: 2,\n\t\t\t\tapiVersionMinor: 0\n\t\t\t};\n\n\t\t\t/**\n\t\t\t * Card authentication methods supported by your site and your gateway\n\t\t\t *\n\t\t\t * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}\n\t\t\t *\n\t\t\t * @todo confirm your processor supports Android device tokens for your supported card networks\n\t\t\t */\n\t\t\tconst allowedCardAuthMethods = [ 'PAN_ONLY', 'CRYPTOGRAM_3DS' ];\n\n\t\t\t/**\n\t\t\t * Identify your gateway and your site's gateway merchant identifier\n\t\t\t *\n\t\t\t * The Google Pay API response will return an encrypted payment method capable\n\t\t\t * of being charged by a supported gateway after payer authorization\n\t\t\t *\n\t\t\t * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#gateway|PaymentMethodTokenizationSpecification}\n\t\t\t */\n\t\t\tconst tokenizationSpecification = {\n\t\t\t\ttype: 'PAYMENT_GATEWAY',\n\t\t\t\tparameters: {\n\t\t\t\t\t'gateway': plugin_id,\n\t\t\t\t\t'gatewayMerchantId': this.merchantID\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t/**\n\t\t\t * Describe your site's support for the CARD payment method and its required fields\n\t\t\t *\n\t\t\t * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}\n\t\t\t */\n\t\t\tthis.baseCardPaymentMethod = {\n\t\t\t\ttype: 'CARD',\n\t\t\t\tparameters: {\n\t\t\t\t\tallowedAuthMethods: allowedCardAuthMethods,\n\t\t\t\t\tallowedCardNetworks: allowedCardNetworks,\n\t\t\t\t\tbillingAddressRequired: true,\n\t\t\t\t\tbillingAddressParameters: {\n\t\t\t\t\t\tformat: 'FULL',\n\t\t\t\t\t\tphoneNumberRequired: true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t/**\n\t\t\t * Describe your site's support for the CARD payment method including optional fields\n\t\t\t *\n\t\t\t * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}\n\t\t\t */\n\t\t\tthis.cardPaymentMethod = Object.assign(\n\t\t\t\t{},\n\t\t\t\tthis.baseCardPaymentMethod,\n\t\t\t\t{\n\t\t\t\t\ttokenizationSpecification: tokenizationSpecification\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * An initialized google.payments.api.PaymentsClient object or null if not yet set\n\t\t\t *\n\t\t\t * @see {@link getGooglePaymentsClient}\n\t\t\t */\n\t\t\tthis.paymentsClient = null;\n\t\t}\n\n\t\t/**\n\t\t * Configure your site's support for payment methods supported by the Google Pay\n\t\t * API.\n\t\t *\n\t\t * Each member of allowedPaymentMethods should contain only the required fields,\n\t\t * allowing reuse of this base request when determining a viewer's ability\n\t\t * to pay and later requesting a supported payment method\n\t\t *\n\t\t * @returns {object} Google Pay API version, payment methods supported by the site\n\t\t */\n\t\tgetGoogleIsReadyToPayRequest() {\n\n\t\t\treturn Object.assign(\n\t\t\t\t{},\n\t\t\t\tthis.baseRequest,\n\t\t\t\t{\n\t\t\t\t\tallowedPaymentMethods: [ this.baseCardPaymentMethod ]\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * Configure support for the Google Pay API\n\t\t *\n\t\t * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest|PaymentDataRequest}\n\t\t *\n\t\t * @param {function} resolve callback\n\t\t * @returns {object} PaymentDataRequest fields\n\t\t */\n\t\tgetGooglePaymentDataRequest( resolve ) {\n\n\t\t\treturn this.getGoogleTransactionInfo( ( transactionInfo ) => {\n\n\t\t\t\tconst paymentDataRequest = Object.assign( {}, this.baseRequest );\n\t\t\t\tpaymentDataRequest.allowedPaymentMethods = [ this.cardPaymentMethod ];\n\t\t\t\tpaymentDataRequest.transactionInfo = transactionInfo;\n\t\t\t\tpaymentDataRequest.merchantInfo = {\n\t\t\t\t\tmerchantId: this.merchantID,\n\t\t\t\t\tmerchantName: this.merchantName\n\t\t\t\t};\n\n\t\t\t\tpaymentDataRequest.emailRequired = true;\n\t\t\t\tpaymentDataRequest.callbackIntents = [ 'PAYMENT_AUTHORIZATION' ];\n\n\t\t\t\tif ( this.needsShipping ) {\n\t\t\t\t\tpaymentDataRequest.callbackIntents = [ 'SHIPPING_ADDRESS', 'SHIPPING_OPTION', 'PAYMENT_AUTHORIZATION' ];\n\t\t\t\t\tpaymentDataRequest.shippingAddressRequired = true;\n\t\t\t\t\tpaymentDataRequest.shippingAddressParameters = this.getGoogleShippingAddressParameters();\n\t\t\t\t\tpaymentDataRequest.shippingOptionRequired = true;\n\t\t\t\t}\n\n\t\t\t\tresolve( paymentDataRequest );\n\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * Return an active PaymentsClient or initialize\n\t\t *\n\t\t * @see {@link https://developers.google.com/pay/api/web/reference/client#PaymentsClient|PaymentsClient constructor}\n\t\t * @returns {google.payments.api.PaymentsClient} Google Pay API client\n\t\t */\n\t\tgetGooglePaymentsClient() {\n\t\t\tif ( this.paymentsClient === null ) {\n\t\t\t\tlet args = {\n\t\t\t\t\tenvironment: this.environment,\n\t\t\t\t\tmerchantInfo: {\n\t\t\t\t\t\tmerchantName: this.merchantName,\n\t\t\t\t\t\tmerchantId: this.merchantID\n\t\t\t\t\t},\n\t\t\t\t\tpaymentDataCallbacks: {\n\t\t\t\t\t\tonPaymentAuthorized: ( paymentData ) => this.onPaymentAuthorized( paymentData ),\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tif ( this.needsShipping ) {\n\t\t\t\t\targs.paymentDataCallbacks.onPaymentDataChanged = ( paymentData ) => this.onPaymentDataChanged( paymentData );\n\t\t\t\t}\n\n\t\t\t\tthis.paymentsClient = new google.payments.api.PaymentsClient( args );\n\t\t\t}\n\t\t\treturn this.paymentsClient;\n\t\t}\n\n\t\t/**\n\t\t * Handles payment authorization callback intent.\n\t\t *\n\t\t * @param {object} paymentData response from Google Pay API after a payer approves payment.\n\t\t * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentData|PaymentData object reference}\n\t\t *\n\t\t * @returns Promise<{object}> Promise object to complete or fail the transaction.\n\t\t */\n\t\tonPaymentAuthorized( paymentData ) {\n\n\t\t\tthis.blockUI();\n\n\t\t\treturn new Promise( (resolve, reject) => {\n\n\t\t\t\t// handle the response\n\t\t\t\ttry {\n\t\t\t\t\tthis.processPayment( paymentData, resolve );\n\t\t\t\t}\tcatch( err ) {\n\t\t\t\t\treject( {\n\t\t\t\t\t\ttransactionState: 'ERROR',\n\t\t\t\t\t\terror: {\n\t\t\t\t\t\t\tintent: 'PAYMENT_AUTHORIZATION',\n\t\t\t\t\t\t\tmessage: 'Payment could not be processed',\n\t\t\t\t\t\t\treason: 'PAYMENT_DATA_INVALID'\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tthis.unblockUI();\n\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * Handles dynamic buy flow shipping address and shipping options callback intents.\n\t\t *\n\t\t * @param {object} intermediatePaymentData response from Google Pay API a shipping address or shipping option is selected in the payment sheet.\n\t\t * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#IntermediatePaymentData|IntermediatePaymentData object reference}\n\t\t *\n\t\t * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentDataRequestUpdate|PaymentDataRequestUpdate}\n\t\t * @returns Promise<{object}> Promise of PaymentDataRequestUpdate object to update the payment sheet.\n\t\t */\n\t\tonPaymentDataChanged( intermediatePaymentData ) {\n\n\t\t\tthis.blockUI();\n\n\t\t\treturn new Promise(( resolve, reject ) => {\n\n\t\t\t\ttry {\n\t\t\t\t\tlet shippingAddress = intermediatePaymentData.shippingAddress;\n\t\t\t\t\tlet shippingOptionData = intermediatePaymentData.shippingOptionData;\n\t\t\t\t\tlet chosenShippingMethod = '';\n\n\t\t\t\t\tif ( intermediatePaymentData.callbackTrigger == 'SHIPPING_OPTION' ) {\n\t\t\t\t\t\tchosenShippingMethod = shippingOptionData.id;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.getUpdatedTotals( shippingAddress, chosenShippingMethod, ( paymentDataRequestUpdate ) => {\n\n\t\t\t\t\t\tif ( paymentDataRequestUpdate.newShippingOptionParameters.shippingOptions.length == 0 ) {\n\t\t\t\t\t\t\tpaymentDataRequestUpdate = {\n\t\t\t\t\t\t\t\terror: this.getGoogleUnserviceableAddressError()\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tresolve( paymentDataRequestUpdate );\n\t\t\t\t\t} );\n\n\t\t\t\t}\tcatch( err ) {\n\t\t\t\t\tthis.failPayment( 'Could not load updated totals or process payment data request update. ' + err );\n\t\t\t\t}\n\n\t\t\t\tthis.unblockUI();\n\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * Provide Google Pay API with a payment amount, currency, and amount status\n\t\t *\n\t\t * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo|TransactionInfo}\n\t\t *\n\t\t * @param {function} resolve callback\n\t\t * @returns {object} transaction info, suitable for use as transactionInfo property of PaymentDataRequest\n\t\t */\n\t\tgetGoogleTransactionInfo( resolve ) {\n\n\t\t\t// get transaction info from cart\n\t\t\tconst data = {\n\t\t\t\taction: `wc_${this.gatewayID}_google_pay_get_transaction_info`,\n\t\t\t}\n\n\t\t\tif ( this.productID ) {\n\t\t\t\tdata.productID = this.productID;\n\t\t\t}\n\n\t\t\t$.post( this.ajaxURL, data, ( response ) => {\n\n\t\t\t\tif ( response.success ) {\n\t\t\t\t\tresolve( JSON.parse( response.data ) )\n\t\t\t\t} else {\n\t\t\t\t\tthis.failPayment( 'Could not build transaction info. ' + response.data.message );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * Get updated totals and shipping options via AJAX for use in the PaymentDataRequest\n\t\t *\n\t\t * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentDataRequestUpdate|PaymentDataRequestUpdate}\n\t\t *\n\t\t * @param {object} shippingAddress shipping address\n\t\t * @param {object} shippingMethod chosen shipping method\n\t\t * @param {function} resolve callback\n\t\t */\n\t\tgetUpdatedTotals( shippingAddress, shippingMethod, resolve ) {\n\n\t\t\tconst data = {\n\t\t\t\taction: `wc_${this.gatewayID}_google_pay_recalculate_totals`,\n\t\t\t\t'nonce': this.recalculateTotalsNonce,\n\t\t\t\tshippingAddress,\n\t\t\t\tshippingMethod\n\t\t\t}\n\n\t\t\tif ( this.productID ) {\n\t\t\t\tdata.productID = this.productID;\n\t\t\t}\n\n\t\t\t$.post( this.ajaxURL, data, ( response ) => {\n\n\t\t\t\tif ( response.success ) {\n\t\t\t\t\tresolve( JSON.parse( response.data ) )\n\t\t\t\t} else {\n\t\t\t\t\tthis.failPayment( 'Could not recalculate totals. ' + response.data.message );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * Provide Google Pay API with shipping address parameters when using dynamic buy flow.\n\t\t *\n\t\t * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#ShippingAddressParameters|ShippingAddressParameters}\n\t\t * @returns {object} shipping address details, suitable for use as shippingAddressParameters property of PaymentDataRequest\n\t\t */\n\t\tgetGoogleShippingAddressParameters() {\n\n\t\t\treturn {\n\t\t\t\tallowedCountryCodes: this.availableCountries\n\t\t\t};\n\t\t}\n\n\t\t/**\n\t\t * Provide Google Pay API with a payment data error.\n\t\t *\n\t\t * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentDataError|PaymentDataError}\n\t\t * @returns {object} payment data error, suitable for use as error property of PaymentDataRequestUpdate\n\t\t */\n\t\tgetGoogleUnserviceableAddressError() {\n\t\t\treturn {\n\t\t\t\treason: 'SHIPPING_ADDRESS_UNSERVICEABLE',\n\t\t\t\tmessage: 'Cannot ship to the selected address',\n\t\t\t\tintent: 'SHIPPING_ADDRESS'\n\t\t\t};\n\t\t}\n\n\t\t/**\n\t\t * Add a Google Pay purchase button alongside an existing checkout button\n\t\t *\n\t\t * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#ButtonOptions|Button options}\n\t\t * @see {@link https://developers.google.com/pay/api/web/guides/brand-guidelines|Google Pay brand guidelines}\n\t\t */\n\t\taddGooglePayButton() {\n\n\t\t\tconst paymentsClient = this.getGooglePaymentsClient();\n\t\t\tconst button = paymentsClient.createButton( {\n\t\t\t\tonClick: ( event ) => this.onGooglePaymentButtonClicked( event ),\n\t\t\t\tbuttonColor: this.buttonStyle,\n\t\t\t\tbuttonSizeMode: 'fill'\n\t\t\t} );\n\t\t\tdocument.getElementById( 'sv-wc-google-pay-button-container' ).appendChild( button );\n\t\t}\n\n\t\t/**\n\t\t * Prefetch payment data to improve performance\n\t\t *\n\t\t * @see {@link https://developers.google.com/pay/api/web/reference/client#prefetchPaymentData|prefetchPaymentData()}\n\t\t */\n\t\tprefetchGooglePaymentData() {\n\n\t\t\tthis.getGooglePaymentDataRequest( ( paymentDataRequest ) => {\n\n\t\t\t\t// transactionInfo must be set but does not affect cache\n\t\t\t\tpaymentDataRequest.transactionInfo = {\n\t\t\t\t\ttotalPriceStatus: 'NOT_CURRENTLY_KNOWN',\n\t\t\t\t\tcurrencyCode: this.currencyCode\n\t\t\t\t};\n\t\t\t\tconst paymentsClient = this.getGooglePaymentsClient();\n\t\t\t\tpaymentsClient.prefetchPaymentData( paymentDataRequest );\n\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * Process payment data returned by the Google Pay API\n\t\t *\n\t\t * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentData|PaymentData object reference}\n\t\t *\n\t\t * @param {object} paymentData response from Google Pay API after user approves payment\n\t\t * @param {function} resolve callback\n\t\t */\n\t\tprocessPayment( paymentData, resolve ) {\n\n\t\t\t// pass payment token to your gateway to process payment\n\t\t\tconst data = {\n\t\t\t\taction: `wc_${this.gatewayID}_google_pay_process_payment`,\n\t\t\t\tnonce: this.processNonce,\n\t\t\t\tpaymentData: JSON.stringify( paymentData ),\n\t\t\t}\n\n\t\t\tif ( this.productID && ! this.needsShipping ) {\n\t\t\t\tdata.productID = this.productID;\n\t\t\t}\n\n\t\t\treturn $.post( this.ajaxURL, data, ( response ) => {\n\t\t\t\tif ( response.success ) {\n\t\t\t\t\tresolve( {\n\t\t\t\t\t\ttransactionState: 'SUCCESS'\n\t\t\t\t\t} );\n\t\t\t\t\twindow.location = response.data.redirect;\n\t\t\t\t} else {\n\t\t\t\t\tresolve( {\n\t\t\t\t\t\ttransactionState: 'ERROR',\n\t\t\t\t\t\terror: {\n\t\t\t\t\t\t\tintent: 'SHIPPING_ADDRESS',\n\t\t\t\t\t\t\tmessage: 'Invalid data',\n\t\t\t\t\t\t\treason: 'PAYMENT_DATA_INVALID'\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t\tthis.failPayment( 'Payment could not be processed. ' + response.data.message );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * Show Google Pay payment sheet when Google Pay payment button is clicked\n\t\t */\n\t\tonGooglePaymentButtonClicked( event ) {\n\n\t\t\tevent.preventDefault();\n\n\t\t\tthis.blockUI();\n\n\t\t\tthis.getGooglePaymentDataRequest( ( paymentDataRequest ) => {\n\n\t\t\t\tconst paymentsClient = this.getGooglePaymentsClient();\n\t\t\t\ttry {\n\t\t\t\t\tpaymentsClient.loadPaymentData( paymentDataRequest );\n\t\t\t\t} catch ( err ) {\n\t\t\t\t\tthis.failPayment( 'Could not load payment data. ' + err );\n\t\t\t\t}\n\n\t\t\t\tthis.unblockUI();\n\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * Initialize Google PaymentsClient after Google-hosted JavaScript has loaded\n\t\t *\n\t\t * Display a Google Pay payment button after confirmation of the viewer's\n\t\t * ability to pay.\n\t\t */\n\t\tinit() {\n\n\t\t\t// initialize for the various pages\n\t\t\tif ( $( 'form.cart' ).length ) {\n\t\t\t\tthis.initProductPage();\n\t\t\t} else if ( $( 'form.woocommerce-cart-form' ).length ) {\n\t\t\t\tthis.initCartPage();\n\t\t\t} else if ( $( 'form.woocommerce-checkout' ).length) {\n\t\t\t\tthis.initCheckoutPage()\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.initGooglePay();\n\t\t}\n\n\t\t/**\n\t\t * Initializes Google Pay.\n\t\t */\n\t\tinitGooglePay() {\n\n\t\t\tconst paymentsClient = this.getGooglePaymentsClient();\n\t\t\tpaymentsClient.isReadyToPay( this.getGoogleIsReadyToPayRequest() )\n\t\t\t\t.then( ( response ) => {\n\t\t\t\t\tif ( response.result ) {\n\t\t\t\t\t\tthis.addGooglePayButton();\n\t\t\t\t\t\t// prefetch payment data to improve performance\n\t\t\t\t\t\tthis.prefetchGooglePaymentData();\n\t\t\t\t\t}\n\t\t\t\t} )\n\t\t\t\t.catch( ( err ) => {\n\t\t\t\t\tthis.failPayment( 'Google Pay is not ready. ' + err );\n\t\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * Initializes the product page.\n\t\t */\n\t\tinitProductPage() {\n\t\t\tthis.uiElement = $( 'form.cart' );\n\t\t}\n\n\t\t/**\n\t\t * Initializes the cart page.\n\t\t */\n\t\tinitCartPage() {\n\t\t\tthis.uiElement = $( 'form.woocommerce-cart-form' ).parents( 'div.woocommerce' );\n\n\t\t\t// re-init if the cart totals are updated\n\t\t\t$( document.body ).on( 'updated_cart_totals', () => {\n\t\t\t\tthis.initGooglePay();\n\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * Initializes the checkout page.\n\t\t */\n\t\tinitCheckoutPage() {\n\t\t\tthis.uiElement = $( 'form.woocommerce-checkout' );\n\t\t}\n\n\t\t/**\n\t\t * Fails the purchase based on the gateway result.\n\t\t */\n\t\tfailPayment( error ) {\n\n\t\t\tconsole.error( '[Google Pay] ' + error );\n\n\t\t\tthis.unblockUI();\n\n\t\t\tthis.renderErrors( [ this.genericError ] );\n\t\t}\n\n\t\t/**\n\t\t * Renders any new errors and bring them into the viewport.\n \t\t */\n\t\trenderErrors( errors ) {\n\n\t\t\t// hide and remove any previous errors\n\t\t\t$( '.woocommerce-error, .woocommerce-message' ).remove();\n\n\t\t\t// add errors\n\t\t\tthis.uiElement.prepend( '
    • ' + errors.join( '
    • ' ) + '
    ' );\n\n\t\t\t// unblock UI\n\t\t\tthis.uiElement.removeClass( 'processing' ).unblock();\n\n\t\t\t// scroll to top\n\t\t\t$( 'html, body' ).animate( { scrollTop: this.uiElement.offset().top - 100 }, 1000 );\n\t\t}\n\n\t\t/**\n\t\t * Blocks the payment form UI.\n\t\t */\n\t\tblockUI() {\n\t\t\tthis.uiElement.block( { message: null, overlayCSS: { background: '#fff', opacity: 0.6 } } );\n\t\t}\n\n\t\t/**\n\t\t * Unblocks the payment form UI.\n\t\t */\n\t\tunblockUI() {\n\t\t\tthis.uiElement.unblock();\n\t\t}\n\t}\n\n\t$( document.body ).trigger( 'sv_wc_google_pay_handler_v5_11_10_loaded' );\n\n} );\n"]} +{"version":3,"sources":["frontend/sv-wc-payment-gateway-google-pay.js"],"names":["jQuery","$","window","SV_WC_Google_Pay_Handler_v5_11_11","params","_classCallCheck","plugin_id","merchant_id","merchant_name","gateway_id","environment","gateway_id_dasherized","ajax_url","recalculate_totals_nonce","process_nonce","button_style","card_types","available_countries","currency_code","needs_shipping","generic_error","gatewayID","merchantID","merchantName","ajaxURL","recalculateTotalsNonce","processNonce","buttonStyle","availableCountries","currencyCode","needsShipping","genericError","product_id","productID","allowedCardNetworks","baseRequest","apiVersion","apiVersionMinor","tokenizationSpecification","type","parameters","baseCardPaymentMethod","allowedAuthMethods","billingAddressRequired","billingAddressParameters","format","phoneNumberRequired","cardPaymentMethod","Object","assign","paymentsClient","_createClass","key","value","allowedPaymentMethods","resolve","_this","getGoogleTransactionInfo","transactionInfo","paymentDataRequest","merchantInfo","merchantId","emailRequired","callbackIntents","shippingAddressRequired","shippingAddressParameters","getGoogleShippingAddressParameters","shippingOptionRequired","_this2","args","paymentDataCallbacks","onPaymentAuthorized","paymentData","onPaymentDataChanged","google","payments","api","PaymentsClient","_this3","blockUI","Promise","reject","processPayment","err","transactionState","error","intent","message","reason","unblockUI","intermediatePaymentData","_this4","shippingAddress","shippingOptionData","chosenShippingMethod","callbackTrigger","id","getUpdatedTotals","paymentDataRequestUpdate","newShippingOptionParameters","shippingOptions","length","getGoogleUnserviceableAddressError","failPayment","_this5","data","action","concat","post","response","success","JSON","parse","shippingMethod","_this6","allowedCountryCodes","_this7","button","getGooglePaymentsClient","createButton","onClick","event","onGooglePaymentButtonClicked","buttonColor","buttonSizeMode","document","getElementById","appendChild","_this8","getGooglePaymentDataRequest","totalPriceStatus","prefetchPaymentData","_this9","nonce","stringify","location","redirect","_this10","preventDefault","loadPaymentData","initProductPage","initCartPage","initCheckoutPage","initGooglePay","_this11","isReadyToPay","getGoogleIsReadyToPayRequest","then","result","addGooglePayButton","prefetchGooglePaymentData","catch","uiElement","_this12","parents","body","on","console","renderErrors","errors","remove","prepend","join","removeClass","unblock","animate","scrollTop","offset","top","block","overlayCSS","background","opacity","trigger"],"mappings":";AAqmBG,SAAA,EAAA,GAAA,OAAA,EAAA,mBAAA,QAAA,iBAAA,OAAA,SAAA,SAAA,GAAA,cAAA,GAAA,SAAA,GAAA,OAAA,GAAA,mBAAA,QAAA,EAAA,cAAA,QAAA,IAAA,OAAA,UAAA,gBAAA,IAAA,GAAA,SAAA,EAAA,EAAA,GAAA,KAAA,aAAA,GAAA,MAAA,IAAA,UAAA,qCAAA,SAAA,EAAA,EAAA,GAAA,IAAA,IAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,CAAA,IAAA,EAAA,EAAA,GAAA,EAAA,WAAA,EAAA,aAAA,EAAA,EAAA,cAAA,EAAA,UAAA,IAAA,EAAA,UAAA,GAAA,OAAA,eAAA,EAAA,EAAA,EAAA,KAAA,IAAA,SAAA,EAAA,EAAA,EAAA,GAAA,OAAA,GAAA,EAAA,EAAA,UAAA,GAAA,GAAA,EAAA,EAAA,GAAA,OAAA,eAAA,EAAA,YAAA,CAAA,UAAA,IAAA,EAAA,SAAA,EAAA,GAAA,IAAA,EAAA,EAAA,EAAA,UAAA,MAAA,WAAA,EAAA,GAAA,EAAA,OAAA,GAAA,SAAA,EAAA,EAAA,GAAA,GAAA,WAAA,EAAA,IAAA,OAA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G,KAAM,aAAgB,cAG5F,KAAKV,UAAUW,YAAa,cAAeC,UAG3CnK,EAAG,cAAeoK,QAAS,CAAEC,UAAW,KAAKd,UAAUe,SAASC,IAAM,KAAO,OAG9E,CAAApH,IAAA,UAAAC,MAGA,WACC,KAAKmG,UAAUiB,MAAO,CAAElF,QAAS,KAAMmF,WAAY,CAAEC,WAAY,OAAQC,QAAS,QAGnF,CAAAxH,IAAA,YAAAC,MAGA,WACC,KAAKmG,UAAUY,cACfjK,EArlBqC,GAwlBvCF,EAAG4H,SAAS8B,MAAOkB,QAAS","file":"sv-wc-payment-gateway-google-pay.js","sourceRoot":"../js","sourcesContent":["jQuery( function( $ ) {\n\n\t\"use strict\"\n\n\t/**\n\t * Google Pay handler.\n\t *\n\t * @since 5.10.0\n\t *\n\t * @type {SV_WC_Google_Pay_Handler_v5_11_11} object\n\t */\n\twindow.SV_WC_Google_Pay_Handler_v5_11_11 = class SV_WC_Google_Pay_Handler_v5_11_11 {\n\n\t\t/**\n\t\t * Handler constructor.\n\t\t *\n\t\t * @since 5.10.0\n\t\t *\n\t\t * @param {Object} params The plugin ID\n\t\t * @param {string} params.plugin_id The plugin ID\n\t\t * @param {string} params.merchant_id The merchant ID\n\t\t * @param {string} params.merchant_name The site name\n\t\t * @param {string} params.gateway_id The gateway ID\n\t\t * @param {string} params.gateway_id_dasherized The gateway ID dasherized\n\t\t * @param {string} params.environment The gateway environment (PRODUCTION or TEST)\n\t\t * @param {string} params.ajax_url The AJAX URL\n\t\t * @param {string} params.recalculate_totals_nonce Nonce for the recalculate_totals AJAX action\n\t\t * @param {string} params.process_nonce Nonce for the process AJAX action\n\t\t * @param {string} params.button_style The button style\n\t\t * @param {string[]} params.card_types The supported card types\n\t\t * @param {string[]} params.available_countries Array of two-letter country codes the gateway is available for\n\t\t * @param {string[]} params.currency_code WC configured currency\n\t\t * @param {boolean} params.needs_shipping Whether or not the cart or product needs shipping\n\t\t * @param {string} params.generic_error The generic error message\n\t\t * @param {string} params.product_id The product ID if we are on a Product page\n\t\t */\n\t\tconstructor( params ) {\n\n\t\t\tlet {\n\t\t\t\tplugin_id,\n\t\t\t\tmerchant_id,\n\t\t\t\tmerchant_name,\n\t\t\t\tgateway_id,\n\t\t\t\tgateway_id_dasherized,\n\t\t\t\tenvironment,\n\t\t\t\tajax_url,\n\t\t\t\trecalculate_totals_nonce,\n\t\t\t\tprocess_nonce,\n\t\t\t\tbutton_style,\n\t\t\t\tcard_types,\n\t\t\t\tavailable_countries,\n\t\t\t\tcurrency_code,\n\t\t\t\tneeds_shipping,\n\t\t\t\tgeneric_error\n\t\t\t} = params;\n\n\t\t\tthis.gatewayID = gateway_id;\n\t\t\tthis.merchantID = merchant_id;\n\t\t\tthis.merchantName = merchant_name;\n\t\t\tthis.environment = environment;\n\t\t\tthis.ajaxURL = ajax_url;\n\t\t\tthis.recalculateTotalsNonce = recalculate_totals_nonce;\n\t\t\tthis.processNonce = process_nonce;\n\t\t\tthis.buttonStyle = button_style;\n\t\t\tthis.availableCountries = available_countries;\n\t\t\tthis.currencyCode = currency_code;\n\t\t\tthis.needsShipping = needs_shipping;\n\t\t\tthis.genericError = generic_error;\n\n\t\t\tif ( params.product_id ) {\n\t\t\t\tthis.productID = params.product_id;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Card networks supported by your site and your gateway\n\t\t\t *\n\t\t\t * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}\n\t\t\t */\n\t\t\tconst allowedCardNetworks = card_types;\n\n\t\t\t/**\n\t\t\t * Define the version of the Google Pay API referenced when creating your configuration\n\t\t\t *\n\t\t\t * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest|apiVersion in PaymentDataRequest}\n\t\t\t */\n\t\t\tthis.baseRequest = {\n\t\t\t\tapiVersion: 2,\n\t\t\t\tapiVersionMinor: 0\n\t\t\t};\n\n\t\t\t/**\n\t\t\t * Card authentication methods supported by your site and your gateway\n\t\t\t *\n\t\t\t * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}\n\t\t\t *\n\t\t\t * @todo confirm your processor supports Android device tokens for your supported card networks\n\t\t\t */\n\t\t\tconst allowedCardAuthMethods = [ 'PAN_ONLY', 'CRYPTOGRAM_3DS' ];\n\n\t\t\t/**\n\t\t\t * Identify your gateway and your site's gateway merchant identifier\n\t\t\t *\n\t\t\t * The Google Pay API response will return an encrypted payment method capable\n\t\t\t * of being charged by a supported gateway after payer authorization\n\t\t\t *\n\t\t\t * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#gateway|PaymentMethodTokenizationSpecification}\n\t\t\t */\n\t\t\tconst tokenizationSpecification = {\n\t\t\t\ttype: 'PAYMENT_GATEWAY',\n\t\t\t\tparameters: {\n\t\t\t\t\t'gateway': plugin_id,\n\t\t\t\t\t'gatewayMerchantId': this.merchantID\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t/**\n\t\t\t * Describe your site's support for the CARD payment method and its required fields\n\t\t\t *\n\t\t\t * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}\n\t\t\t */\n\t\t\tthis.baseCardPaymentMethod = {\n\t\t\t\ttype: 'CARD',\n\t\t\t\tparameters: {\n\t\t\t\t\tallowedAuthMethods: allowedCardAuthMethods,\n\t\t\t\t\tallowedCardNetworks: allowedCardNetworks,\n\t\t\t\t\tbillingAddressRequired: true,\n\t\t\t\t\tbillingAddressParameters: {\n\t\t\t\t\t\tformat: 'FULL',\n\t\t\t\t\t\tphoneNumberRequired: true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t/**\n\t\t\t * Describe your site's support for the CARD payment method including optional fields\n\t\t\t *\n\t\t\t * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}\n\t\t\t */\n\t\t\tthis.cardPaymentMethod = Object.assign(\n\t\t\t\t{},\n\t\t\t\tthis.baseCardPaymentMethod,\n\t\t\t\t{\n\t\t\t\t\ttokenizationSpecification: tokenizationSpecification\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * An initialized google.payments.api.PaymentsClient object or null if not yet set\n\t\t\t *\n\t\t\t * @see {@link getGooglePaymentsClient}\n\t\t\t */\n\t\t\tthis.paymentsClient = null;\n\t\t}\n\n\t\t/**\n\t\t * Configure your site's support for payment methods supported by the Google Pay\n\t\t * API.\n\t\t *\n\t\t * Each member of allowedPaymentMethods should contain only the required fields,\n\t\t * allowing reuse of this base request when determining a viewer's ability\n\t\t * to pay and later requesting a supported payment method\n\t\t *\n\t\t * @returns {object} Google Pay API version, payment methods supported by the site\n\t\t */\n\t\tgetGoogleIsReadyToPayRequest() {\n\n\t\t\treturn Object.assign(\n\t\t\t\t{},\n\t\t\t\tthis.baseRequest,\n\t\t\t\t{\n\t\t\t\t\tallowedPaymentMethods: [ this.baseCardPaymentMethod ]\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * Configure support for the Google Pay API\n\t\t *\n\t\t * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest|PaymentDataRequest}\n\t\t *\n\t\t * @param {function} resolve callback\n\t\t * @returns {object} PaymentDataRequest fields\n\t\t */\n\t\tgetGooglePaymentDataRequest( resolve ) {\n\n\t\t\treturn this.getGoogleTransactionInfo( ( transactionInfo ) => {\n\n\t\t\t\tconst paymentDataRequest = Object.assign( {}, this.baseRequest );\n\t\t\t\tpaymentDataRequest.allowedPaymentMethods = [ this.cardPaymentMethod ];\n\t\t\t\tpaymentDataRequest.transactionInfo = transactionInfo;\n\t\t\t\tpaymentDataRequest.merchantInfo = {\n\t\t\t\t\tmerchantId: this.merchantID,\n\t\t\t\t\tmerchantName: this.merchantName\n\t\t\t\t};\n\n\t\t\t\tpaymentDataRequest.emailRequired = true;\n\t\t\t\tpaymentDataRequest.callbackIntents = [ 'PAYMENT_AUTHORIZATION' ];\n\n\t\t\t\tif ( this.needsShipping ) {\n\t\t\t\t\tpaymentDataRequest.callbackIntents = [ 'SHIPPING_ADDRESS', 'SHIPPING_OPTION', 'PAYMENT_AUTHORIZATION' ];\n\t\t\t\t\tpaymentDataRequest.shippingAddressRequired = true;\n\t\t\t\t\tpaymentDataRequest.shippingAddressParameters = this.getGoogleShippingAddressParameters();\n\t\t\t\t\tpaymentDataRequest.shippingOptionRequired = true;\n\t\t\t\t}\n\n\t\t\t\tresolve( paymentDataRequest );\n\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * Return an active PaymentsClient or initialize\n\t\t *\n\t\t * @see {@link https://developers.google.com/pay/api/web/reference/client#PaymentsClient|PaymentsClient constructor}\n\t\t * @returns {google.payments.api.PaymentsClient} Google Pay API client\n\t\t */\n\t\tgetGooglePaymentsClient() {\n\t\t\tif ( this.paymentsClient === null ) {\n\t\t\t\tlet args = {\n\t\t\t\t\tenvironment: this.environment,\n\t\t\t\t\tmerchantInfo: {\n\t\t\t\t\t\tmerchantName: this.merchantName,\n\t\t\t\t\t\tmerchantId: this.merchantID\n\t\t\t\t\t},\n\t\t\t\t\tpaymentDataCallbacks: {\n\t\t\t\t\t\tonPaymentAuthorized: ( paymentData ) => this.onPaymentAuthorized( paymentData ),\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tif ( this.needsShipping ) {\n\t\t\t\t\targs.paymentDataCallbacks.onPaymentDataChanged = ( paymentData ) => this.onPaymentDataChanged( paymentData );\n\t\t\t\t}\n\n\t\t\t\tthis.paymentsClient = new google.payments.api.PaymentsClient( args );\n\t\t\t}\n\t\t\treturn this.paymentsClient;\n\t\t}\n\n\t\t/**\n\t\t * Handles payment authorization callback intent.\n\t\t *\n\t\t * @param {object} paymentData response from Google Pay API after a payer approves payment.\n\t\t * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentData|PaymentData object reference}\n\t\t *\n\t\t * @returns Promise<{object}> Promise object to complete or fail the transaction.\n\t\t */\n\t\tonPaymentAuthorized( paymentData ) {\n\n\t\t\tthis.blockUI();\n\n\t\t\treturn new Promise( (resolve, reject) => {\n\n\t\t\t\t// handle the response\n\t\t\t\ttry {\n\t\t\t\t\tthis.processPayment( paymentData, resolve );\n\t\t\t\t}\tcatch( err ) {\n\t\t\t\t\treject( {\n\t\t\t\t\t\ttransactionState: 'ERROR',\n\t\t\t\t\t\terror: {\n\t\t\t\t\t\t\tintent: 'PAYMENT_AUTHORIZATION',\n\t\t\t\t\t\t\tmessage: 'Payment could not be processed',\n\t\t\t\t\t\t\treason: 'PAYMENT_DATA_INVALID'\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tthis.unblockUI();\n\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * Handles dynamic buy flow shipping address and shipping options callback intents.\n\t\t *\n\t\t * @param {object} intermediatePaymentData response from Google Pay API a shipping address or shipping option is selected in the payment sheet.\n\t\t * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#IntermediatePaymentData|IntermediatePaymentData object reference}\n\t\t *\n\t\t * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentDataRequestUpdate|PaymentDataRequestUpdate}\n\t\t * @returns Promise<{object}> Promise of PaymentDataRequestUpdate object to update the payment sheet.\n\t\t */\n\t\tonPaymentDataChanged( intermediatePaymentData ) {\n\n\t\t\tthis.blockUI();\n\n\t\t\treturn new Promise(( resolve, reject ) => {\n\n\t\t\t\ttry {\n\t\t\t\t\tlet shippingAddress = intermediatePaymentData.shippingAddress;\n\t\t\t\t\tlet shippingOptionData = intermediatePaymentData.shippingOptionData;\n\t\t\t\t\tlet chosenShippingMethod = '';\n\n\t\t\t\t\tif ( intermediatePaymentData.callbackTrigger == 'SHIPPING_OPTION' ) {\n\t\t\t\t\t\tchosenShippingMethod = shippingOptionData.id;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.getUpdatedTotals( shippingAddress, chosenShippingMethod, ( paymentDataRequestUpdate ) => {\n\n\t\t\t\t\t\tif ( paymentDataRequestUpdate.newShippingOptionParameters.shippingOptions.length == 0 ) {\n\t\t\t\t\t\t\tpaymentDataRequestUpdate = {\n\t\t\t\t\t\t\t\terror: this.getGoogleUnserviceableAddressError()\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tresolve( paymentDataRequestUpdate );\n\t\t\t\t\t} );\n\n\t\t\t\t}\tcatch( err ) {\n\t\t\t\t\tthis.failPayment( 'Could not load updated totals or process payment data request update. ' + err );\n\t\t\t\t}\n\n\t\t\t\tthis.unblockUI();\n\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * Provide Google Pay API with a payment amount, currency, and amount status\n\t\t *\n\t\t * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo|TransactionInfo}\n\t\t *\n\t\t * @param {function} resolve callback\n\t\t * @returns {object} transaction info, suitable for use as transactionInfo property of PaymentDataRequest\n\t\t */\n\t\tgetGoogleTransactionInfo( resolve ) {\n\n\t\t\t// get transaction info from cart\n\t\t\tconst data = {\n\t\t\t\taction: `wc_${this.gatewayID}_google_pay_get_transaction_info`,\n\t\t\t}\n\n\t\t\tif ( this.productID ) {\n\t\t\t\tdata.productID = this.productID;\n\t\t\t}\n\n\t\t\t$.post( this.ajaxURL, data, ( response ) => {\n\n\t\t\t\tif ( response.success ) {\n\t\t\t\t\tresolve( JSON.parse( response.data ) )\n\t\t\t\t} else {\n\t\t\t\t\tthis.failPayment( 'Could not build transaction info. ' + response.data.message );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * Get updated totals and shipping options via AJAX for use in the PaymentDataRequest\n\t\t *\n\t\t * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentDataRequestUpdate|PaymentDataRequestUpdate}\n\t\t *\n\t\t * @param {object} shippingAddress shipping address\n\t\t * @param {object} shippingMethod chosen shipping method\n\t\t * @param {function} resolve callback\n\t\t */\n\t\tgetUpdatedTotals( shippingAddress, shippingMethod, resolve ) {\n\n\t\t\tconst data = {\n\t\t\t\taction: `wc_${this.gatewayID}_google_pay_recalculate_totals`,\n\t\t\t\t'nonce': this.recalculateTotalsNonce,\n\t\t\t\tshippingAddress,\n\t\t\t\tshippingMethod\n\t\t\t}\n\n\t\t\tif ( this.productID ) {\n\t\t\t\tdata.productID = this.productID;\n\t\t\t}\n\n\t\t\t$.post( this.ajaxURL, data, ( response ) => {\n\n\t\t\t\tif ( response.success ) {\n\t\t\t\t\tresolve( JSON.parse( response.data ) )\n\t\t\t\t} else {\n\t\t\t\t\tthis.failPayment( 'Could not recalculate totals. ' + response.data.message );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * Provide Google Pay API with shipping address parameters when using dynamic buy flow.\n\t\t *\n\t\t * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#ShippingAddressParameters|ShippingAddressParameters}\n\t\t * @returns {object} shipping address details, suitable for use as shippingAddressParameters property of PaymentDataRequest\n\t\t */\n\t\tgetGoogleShippingAddressParameters() {\n\n\t\t\treturn {\n\t\t\t\tallowedCountryCodes: this.availableCountries\n\t\t\t};\n\t\t}\n\n\t\t/**\n\t\t * Provide Google Pay API with a payment data error.\n\t\t *\n\t\t * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentDataError|PaymentDataError}\n\t\t * @returns {object} payment data error, suitable for use as error property of PaymentDataRequestUpdate\n\t\t */\n\t\tgetGoogleUnserviceableAddressError() {\n\t\t\treturn {\n\t\t\t\treason: 'SHIPPING_ADDRESS_UNSERVICEABLE',\n\t\t\t\tmessage: 'Cannot ship to the selected address',\n\t\t\t\tintent: 'SHIPPING_ADDRESS'\n\t\t\t};\n\t\t}\n\n\t\t/**\n\t\t * Add a Google Pay purchase button alongside an existing checkout button\n\t\t *\n\t\t * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#ButtonOptions|Button options}\n\t\t * @see {@link https://developers.google.com/pay/api/web/guides/brand-guidelines|Google Pay brand guidelines}\n\t\t */\n\t\taddGooglePayButton() {\n\n\t\t\tconst paymentsClient = this.getGooglePaymentsClient();\n\t\t\tconst button = paymentsClient.createButton( {\n\t\t\t\tonClick: ( event ) => this.onGooglePaymentButtonClicked( event ),\n\t\t\t\tbuttonColor: this.buttonStyle,\n\t\t\t\tbuttonSizeMode: 'fill'\n\t\t\t} );\n\t\t\tdocument.getElementById( 'sv-wc-google-pay-button-container' ).appendChild( button );\n\t\t}\n\n\t\t/**\n\t\t * Prefetch payment data to improve performance\n\t\t *\n\t\t * @see {@link https://developers.google.com/pay/api/web/reference/client#prefetchPaymentData|prefetchPaymentData()}\n\t\t */\n\t\tprefetchGooglePaymentData() {\n\n\t\t\tthis.getGooglePaymentDataRequest( ( paymentDataRequest ) => {\n\n\t\t\t\t// transactionInfo must be set but does not affect cache\n\t\t\t\tpaymentDataRequest.transactionInfo = {\n\t\t\t\t\ttotalPriceStatus: 'NOT_CURRENTLY_KNOWN',\n\t\t\t\t\tcurrencyCode: this.currencyCode\n\t\t\t\t};\n\t\t\t\tconst paymentsClient = this.getGooglePaymentsClient();\n\t\t\t\tpaymentsClient.prefetchPaymentData( paymentDataRequest );\n\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * Process payment data returned by the Google Pay API\n\t\t *\n\t\t * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentData|PaymentData object reference}\n\t\t *\n\t\t * @param {object} paymentData response from Google Pay API after user approves payment\n\t\t * @param {function} resolve callback\n\t\t */\n\t\tprocessPayment( paymentData, resolve ) {\n\n\t\t\t// pass payment token to your gateway to process payment\n\t\t\tconst data = {\n\t\t\t\taction: `wc_${this.gatewayID}_google_pay_process_payment`,\n\t\t\t\tnonce: this.processNonce,\n\t\t\t\tpaymentData: JSON.stringify( paymentData ),\n\t\t\t}\n\n\t\t\tif ( this.productID && ! this.needsShipping ) {\n\t\t\t\tdata.productID = this.productID;\n\t\t\t}\n\n\t\t\treturn $.post( this.ajaxURL, data, ( response ) => {\n\t\t\t\tif ( response.success ) {\n\t\t\t\t\tresolve( {\n\t\t\t\t\t\ttransactionState: 'SUCCESS'\n\t\t\t\t\t} );\n\t\t\t\t\twindow.location = response.data.redirect;\n\t\t\t\t} else {\n\t\t\t\t\tresolve( {\n\t\t\t\t\t\ttransactionState: 'ERROR',\n\t\t\t\t\t\terror: {\n\t\t\t\t\t\t\tintent: 'SHIPPING_ADDRESS',\n\t\t\t\t\t\t\tmessage: 'Invalid data',\n\t\t\t\t\t\t\treason: 'PAYMENT_DATA_INVALID'\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t\tthis.failPayment( 'Payment could not be processed. ' + response.data.message );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * Show Google Pay payment sheet when Google Pay payment button is clicked\n\t\t */\n\t\tonGooglePaymentButtonClicked( event ) {\n\n\t\t\tevent.preventDefault();\n\n\t\t\tthis.blockUI();\n\n\t\t\tthis.getGooglePaymentDataRequest( ( paymentDataRequest ) => {\n\n\t\t\t\tconst paymentsClient = this.getGooglePaymentsClient();\n\t\t\t\ttry {\n\t\t\t\t\tpaymentsClient.loadPaymentData( paymentDataRequest );\n\t\t\t\t} catch ( err ) {\n\t\t\t\t\tthis.failPayment( 'Could not load payment data. ' + err );\n\t\t\t\t}\n\n\t\t\t\tthis.unblockUI();\n\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * Initialize Google PaymentsClient after Google-hosted JavaScript has loaded\n\t\t *\n\t\t * Display a Google Pay payment button after confirmation of the viewer's\n\t\t * ability to pay.\n\t\t */\n\t\tinit() {\n\n\t\t\t// initialize for the various pages\n\t\t\tif ( $( 'form.cart' ).length ) {\n\t\t\t\tthis.initProductPage();\n\t\t\t} else if ( $( 'form.woocommerce-cart-form' ).length ) {\n\t\t\t\tthis.initCartPage();\n\t\t\t} else if ( $( 'form.woocommerce-checkout' ).length) {\n\t\t\t\tthis.initCheckoutPage()\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.initGooglePay();\n\t\t}\n\n\t\t/**\n\t\t * Initializes Google Pay.\n\t\t */\n\t\tinitGooglePay() {\n\n\t\t\tconst paymentsClient = this.getGooglePaymentsClient();\n\t\t\tpaymentsClient.isReadyToPay( this.getGoogleIsReadyToPayRequest() )\n\t\t\t\t.then( ( response ) => {\n\t\t\t\t\tif ( response.result ) {\n\t\t\t\t\t\tthis.addGooglePayButton();\n\t\t\t\t\t\t// prefetch payment data to improve performance\n\t\t\t\t\t\tthis.prefetchGooglePaymentData();\n\t\t\t\t\t}\n\t\t\t\t} )\n\t\t\t\t.catch( ( err ) => {\n\t\t\t\t\tthis.failPayment( 'Google Pay is not ready. ' + err );\n\t\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * Initializes the product page.\n\t\t */\n\t\tinitProductPage() {\n\t\t\tthis.uiElement = $( 'form.cart' );\n\t\t}\n\n\t\t/**\n\t\t * Initializes the cart page.\n\t\t */\n\t\tinitCartPage() {\n\t\t\tthis.uiElement = $( 'form.woocommerce-cart-form' ).parents( 'div.woocommerce' );\n\n\t\t\t// re-init if the cart totals are updated\n\t\t\t$( document.body ).on( 'updated_cart_totals', () => {\n\t\t\t\tthis.initGooglePay();\n\t\t\t} );\n\t\t}\n\n\t\t/**\n\t\t * Initializes the checkout page.\n\t\t */\n\t\tinitCheckoutPage() {\n\t\t\tthis.uiElement = $( 'form.woocommerce-checkout' );\n\t\t}\n\n\t\t/**\n\t\t * Fails the purchase based on the gateway result.\n\t\t */\n\t\tfailPayment( error ) {\n\n\t\t\tconsole.error( '[Google Pay] ' + error );\n\n\t\t\tthis.unblockUI();\n\n\t\t\tthis.renderErrors( [ this.genericError ] );\n\t\t}\n\n\t\t/**\n\t\t * Renders any new errors and bring them into the viewport.\n \t\t */\n\t\trenderErrors( errors ) {\n\n\t\t\t// hide and remove any previous errors\n\t\t\t$( '.woocommerce-error, .woocommerce-message' ).remove();\n\n\t\t\t// add errors\n\t\t\tthis.uiElement.prepend( '
    • ' + errors.join( '
    • ' ) + '
    ' );\n\n\t\t\t// unblock UI\n\t\t\tthis.uiElement.removeClass( 'processing' ).unblock();\n\n\t\t\t// scroll to top\n\t\t\t$( 'html, body' ).animate( { scrollTop: this.uiElement.offset().top - 100 }, 1000 );\n\t\t}\n\n\t\t/**\n\t\t * Blocks the payment form UI.\n\t\t */\n\t\tblockUI() {\n\t\t\tthis.uiElement.block( { message: null, overlayCSS: { background: '#fff', opacity: 0.6 } } );\n\t\t}\n\n\t\t/**\n\t\t * Unblocks the payment form UI.\n\t\t */\n\t\tunblockUI() {\n\t\t\tthis.uiElement.unblock();\n\t\t}\n\t}\n\n\t$( document.body ).trigger( 'sv_wc_google_pay_handler_v5_11_11_loaded' );\n\n} );\n"]} diff --git a/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-my-payment-methods.js b/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-my-payment-methods.js index 640de8635..fbf98dfe2 100644 --- a/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-my-payment-methods.js +++ b/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-my-payment-methods.js @@ -1,4 +1,4 @@ parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c0&&e(o).find("td.woocommerce-PaymentMethod--method").html(i.html()),e(o).find("td.woocommerce-PaymentMethod--title").remove()})}},{key:"remove_duplicate_default_marks",value:function(){return e(".woocommerce-MyAccount-paymentMethods").find("tr").each(function(t,n){return e(n).find("td.woocommerce-PaymentMethod--default").find("mark.default:not(:first-child)").remove()})}},{key:"edit_method",value:function(t){var n,o;if(t.preventDefault(),0!==(o=(n=e(t.currentTarget)).parents("tr")).find("input[name=plugin-id][value=".concat(this.slug,"]")).length)return o.find("div.view").hide(),o.find("div.edit").show(),o.addClass("editing"),n.text(this.i18n.cancel_button).removeClass("edit").addClass("cancel-edit").removeClass("button"),this.enable_editing_ui()}},{key:"save_method",value:function(t){var n,o,i,a=this;if(t.preventDefault(),n=e(t.currentTarget),0!==(i=n.parents("tr")).find("input[name=plugin-id][value=".concat(this.slug,"]")).length)return this.block_ui(),i.next(".error").remove(),o={action:"wc_".concat(this.id,"_save_payment_method"),nonce:this.ajax_nonce,token_id:i.find("input[name=token-id]").val(),data:i.find("input[name]").serialize()},e.post(this.ajax_url,o).done(function(e){return e.success?(null!=e.data.title&&i.find(".woocommerce-PaymentMethod--method").html(e.data.title),null!=e.data.nonce&&(a.ajax_nonce=e.data.nonce),n.siblings(".cancel-edit").removeClass("cancel-edit").addClass("edit").text(a.i18n.edit_button).addClass("button"),a.disable_editing_ui()):a.display_error(i,e.data)}).fail(function(e,t,n){return a.display_error(i,n)}).always(function(){return a.unblock_ui()})}},{key:"cancel_edit",value:function(t){var n,o;if(t.preventDefault(),0!==(o=(n=e(t.currentTarget)).parents("tr")).find("input[name=plugin-id][value=".concat(this.slug,"]")).length)return o.find("div.view").show(),o.find("div.edit").hide(),o.removeClass("editing"),n.removeClass("cancel-edit").addClass("edit").text(this.i18n.edit_button).addClass("button"),this.disable_editing_ui()}},{key:"enable_editing_ui",value:function(){return e(".woocommerce-MyAccount-paymentMethods").addClass("editing"),e('.button[href*="add-payment-method"]').addClass("disabled")}},{key:"disable_editing_ui",value:function(){return e(".woocommerce-MyAccount-paymentMethods").removeClass("editing"),e('.button[href*="add-payment-method"]').removeClass("disabled")}},{key:"block_ui",value:function(){return e(".woocommerce-MyAccount-paymentMethods").parent("div").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}},{key:"unblock_ui",value:function(){return e(".woocommerce-MyAccount-paymentMethods").parent("div").unblock()}},{key:"display_error",value:function(t,n){var o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return console.error(n),i||(i=this.i18n.save_error),o=e(".woocommerce-MyAccount-paymentMethods thead tr th").length,e(''+i+"").insertAfter(t).find("td").delay(8e3).slideUp(200)}}]),n}(),e(document.body).trigger("sv_wc_payment_methods_handler_v5_11_10_loaded")})}).call(this); +function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n0&&e(o).find("td.woocommerce-PaymentMethod--method").html(i.html()),e(o).find("td.woocommerce-PaymentMethod--title").remove()})}},{key:"remove_duplicate_default_marks",value:function(){return e(".woocommerce-MyAccount-paymentMethods").find("tr").each(function(t,n){return e(n).find("td.woocommerce-PaymentMethod--default").find("mark.default:not(:first-child)").remove()})}},{key:"edit_method",value:function(t){var n,o;if(t.preventDefault(),0!==(o=(n=e(t.currentTarget)).parents("tr")).find("input[name=plugin-id][value=".concat(this.slug,"]")).length)return o.find("div.view").hide(),o.find("div.edit").show(),o.addClass("editing"),n.text(this.i18n.cancel_button).removeClass("edit").addClass("cancel-edit").removeClass("button"),this.enable_editing_ui()}},{key:"save_method",value:function(t){var n,o,i,a=this;if(t.preventDefault(),n=e(t.currentTarget),0!==(i=n.parents("tr")).find("input[name=plugin-id][value=".concat(this.slug,"]")).length)return this.block_ui(),i.next(".error").remove(),o={action:"wc_".concat(this.id,"_save_payment_method"),nonce:this.ajax_nonce,token_id:i.find("input[name=token-id]").val(),data:i.find("input[name]").serialize()},e.post(this.ajax_url,o).done(function(e){return e.success?(null!=e.data.title&&i.find(".woocommerce-PaymentMethod--method").html(e.data.title),null!=e.data.nonce&&(a.ajax_nonce=e.data.nonce),n.siblings(".cancel-edit").removeClass("cancel-edit").addClass("edit").text(a.i18n.edit_button).addClass("button"),a.disable_editing_ui()):a.display_error(i,e.data)}).fail(function(e,t,n){return a.display_error(i,n)}).always(function(){return a.unblock_ui()})}},{key:"cancel_edit",value:function(t){var n,o;if(t.preventDefault(),0!==(o=(n=e(t.currentTarget)).parents("tr")).find("input[name=plugin-id][value=".concat(this.slug,"]")).length)return o.find("div.view").show(),o.find("div.edit").hide(),o.removeClass("editing"),n.removeClass("cancel-edit").addClass("edit").text(this.i18n.edit_button).addClass("button"),this.disable_editing_ui()}},{key:"enable_editing_ui",value:function(){return e(".woocommerce-MyAccount-paymentMethods").addClass("editing"),e('.button[href*="add-payment-method"]').addClass("disabled")}},{key:"disable_editing_ui",value:function(){return e(".woocommerce-MyAccount-paymentMethods").removeClass("editing"),e('.button[href*="add-payment-method"]').removeClass("disabled")}},{key:"block_ui",value:function(){return e(".woocommerce-MyAccount-paymentMethods").parent("div").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}},{key:"unblock_ui",value:function(){return e(".woocommerce-MyAccount-paymentMethods").parent("div").unblock()}},{key:"display_error",value:function(t,n){var o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return console.error(n),i||(i=this.i18n.save_error),o=e(".woocommerce-MyAccount-paymentMethods thead tr th").length,e(''+i+"").insertAfter(t).find("td").delay(8e3).slideUp(200)}}]),n}(),e(document.body).trigger("sv_wc_payment_methods_handler_v5_11_11_loaded")})}).call(this); },{}]},{},["nDDW"], null) //# sourceMappingURL=../frontend/sv-wc-payment-gateway-my-payment-methods.js.map diff --git a/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-my-payment-methods.js.map b/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-my-payment-methods.js.map index f953545b6..f804aecfe 100644 --- a/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-my-payment-methods.js.map +++ b/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-my-payment-methods.js.map @@ -1 +1 @@ -{"version":3,"sources":["frontend/sv-wc-payment-gateway-my-payment-methods.coffee"],"names":[],"mappings":";AAQA,SAAA,EAAA,GAAA,OAAA,EAAA,mBAAA,QAAA,iBAAA,OAAA,SAAA,SAAA,GAAA,cAAA,GAAA,SAAA,GAAA,OAAA,GAAA,mBAAA,QAAA,EAAA,cAAA,QAAA,IAAA,OAAA,UAAA,gBAAA,IAAA,GAAA,SAAA,EAAA,EAAA,GAAA,KAAA,aAAA,GAAA,MAAA,IAAA,UAAA,qCAAA,SAAA,EAAA,EAAA,GAAA,IAAA,IAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,CAAA,IAAA,EAAA,EAAA,GAAA,EAAA,WAAA,EAAA,aAAA,EAAA,EAAA,cAAA,EAAA,UAAA,IAAA,EAAA,UAAA,GAAA,OAAA,eAAA,EAAA,EAAA,EAAA,KAAA,IAAA,SAAA,EAAA,EAAA,EAAA,GAAA,OAAA,GAAA,EAAA,EAAA,UAAA,GAAA,GAAA,EAAA,EAAA,GAAA,OAAA,eAAA,EAAA,YAAA,CAAA,UAAA,IAAA,EAAA,SAAA,EAAA,GAAA,IAAA,EAAA,EAAA,EAAA,UAAA,MAAA,WAAA,EAAA,GAAA,EAAA,OAAA,GAAA,SAAA,EAAA,EAAA,GAAA,GAAA,WAAA,EAAA,IAAA,OAAA,EAAA,OAAA,EAAA,IAAA,EAAA,EAAA,OAAA,aAAA,QAAA,IAAA,EAAA,CAAA,IAAA,EAAA,EAAA,KAAA,EAAA,GAAA,WAAA,GAAA,WAAA,EAAA,GAAA,OAAA,EAAA,MAAA,IAAA,UAAA,gDAAA,OAAA,WAAA,EAAA,OAAA,QAAA,IADG,WACH,OAAO,SAAE,GACR,aAqQA,OAhQM,OAAO,s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SkyVerge Payment Gateway My Payment Methods CoffeeScript\n Version 5.1.0\n\n Copyright (c) 2014-2023, SkyVerge, Inc.\n Licensed under the GNU General Public License v3.0\n http://www.gnu.org/licenses/gpl-3.0.html\n###\njQuery ( $ ) ->\n\t\"use strict\"\n\n\t# The My Payment Methods handler.\n\t#\n\t# @since 5.1.0\n\tclass window.SV_WC_Payment_Methods_Handler_v5_11_10\n\n\n\t\t# Constructs the class.\n\t\t#\n\t\t# @since 5.1.0\n\t\t#\n\t\t# @param [Object] args, with the properties:\n\t\t# id: [String] plugin ID\n\t\t# slug: [String] plugin slug or dasherized ID\n\t\t# i18n: [Object] localized text strings\n\t\t# ajax_url: [String] URL for AJAX requests\n\t\t# ajax_nonce: [String] nonce for AJAX requests\n\t\tconstructor: ( args ) ->\n\n\t\t\t@id = args.id\n\t\t\t@slug = args.slug\n\t\t\t@i18n = args.i18n\n\t\t\t@ajax_url = args.ajax_url\n\t\t\t@ajax_nonce = args.ajax_nonce\n\n\t\t\t# replace the \"Method\" column content for FW tokens\n\t\t\tthis.replace_method_column()\n\n\t\t\t# remove duplicate \"Default\" marks\n\t\t\tthis.remove_duplicate_default_marks()\n\n\t\t\t# handle the edit action\n\t\t\t$( \".woocommerce-MyAccount-paymentMethods\" ).on( 'click', \".woocommerce-PaymentMethod--actions .button.edit\", ( event ) => this.edit_method( event ) )\n\n\t\t\t# handle the save action\n\t\t\t$( \".woocommerce-MyAccount-paymentMethods\" ).on( 'click', \".woocommerce-PaymentMethod--actions .button.save\", ( event ) => this.save_method( event ) )\n\n\t\t\t# handle the cancel action\n\t\t\t$( \".woocommerce-MyAccount-paymentMethods\" ).on( 'click', \".woocommerce-PaymentMethod--actions .cancel-edit\", ( event ) => this.cancel_edit( event ) )\n\n\t\t\t# handle the delete action\n\t\t\t$( \".woocommerce-MyAccount-paymentMethods\" ).on( 'click', \".woocommerce-PaymentMethod--actions .button.delete\", ( event ) =>\n\n\t\t\t\tbutton = $( event.currentTarget )\n\t\t\t\trow = button.parents( 'tr' )\n\n\t\t\t\t# check if the method belongs to this plugin\n\t\t\t\tif row.find( \"input[name=plugin-id][value=#{@slug}]\" ).length is 0\n\t\t\t\t\treturn\n\n\t\t\t\tif not confirm( @i18n.delete_ays )\n\t\t\t\t\tevent.preventDefault()\n\n\t\t\t)\n\n\t\t\t# don't follow the Add Payment Method button URL if it's disabled\n\t\t\t$( '.button[href*=\"add-payment-method\"]' ).click ( event ) ->\n\t\t\t\tevent.preventDefault() if $( this ).hasClass( 'disabled' )\n\n\n\t\t# Replace Method column content with Title column content, for FW tokens.\n\t\t#\n\t\t# @since 5.8.0\n\t\treplace_method_column: =>\n\n\t\t\t$( '.woocommerce-MyAccount-paymentMethods' ).find( 'tr' ).each ( index, element ) =>\n\n\t\t\t\t# check if the method belongs to this plugin\n\t\t\t\tif $( element ).find( \"input[name=plugin-id][value=#{@slug}]\" ).length is 0\n\t\t\t\t\treturn\n\n\t\t\t\t# delete the Title header\n\t\t\t\t$( element ).find( 'th.woocommerce-PaymentMethod--title' ).remove()\n\n\t\t\t\ttitleColumn = $( element ).find( 'td.woocommerce-PaymentMethod--title' )\n\n\t\t\t\t# Title column is not empty, this is a FW token\n\t\t\t\tif ( titleColumn.children().length > 0 )\n\n\t\t\t\t\t# replace Method column\n\t\t\t\t\t$( element ).find( 'td.woocommerce-PaymentMethod--method' ).html( titleColumn.html() )\n\n\t\t\t\t# delete Title column\n\t\t\t\t$( element ).find( 'td.woocommerce-PaymentMethod--title' ).remove()\n\n\n\t\t# Removes duplicate \"Default\" marks.\n\t\t#\n\t\t# They are already hidden using CSS, but should also be removed for accessibility.\n\t\t#\n\t\t# @since 5.8.0\n\t\tremove_duplicate_default_marks: =>\n\n\t\t\t$( '.woocommerce-MyAccount-paymentMethods' ).find( 'tr' ).each ( index, element ) =>\n\n\t\t\t\t$( element ).find( 'td.woocommerce-PaymentMethod--default' ).find( 'mark.default:not(:first-child)' ).remove()\n\n\n\t\t# Edits a payment method.\n\t\t#\n\t\t# @since 5.1.0\n\t\t#\n\t\t# @param [Object] event jQuery event object\n\t\tedit_method: ( event ) =>\n\n\t\t\tevent.preventDefault()\n\n\t\t\tbutton = $( event.currentTarget )\n\t\t\trow = button.parents( 'tr' )\n\n\t\t\t# check if the method belongs to this plugin\n\t\t\tif row.find( \"input[name=plugin-id][value=#{@slug}]\" ).length is 0\n\t\t\t\treturn\n\n\t\t\trow.find( 'div.view' ).hide()\n\t\t\trow.find( 'div.edit' ).show()\n\t\t\trow.addClass( 'editing' )\n\n\t\t\t# change the Edit button to \"Cancel\"\n\t\t\tbutton.text( @i18n.cancel_button ).removeClass( 'edit' ).addClass( 'cancel-edit' ).removeClass( 'button' )\n\n\t\t\tthis.enable_editing_ui()\n\n\n\t\t# Saves a payment method.\n\t\t#\n\t\t# @since 5.1.0\n\t\t#\n\t\t# @param [Object] event jQuery event object\n\t\tsave_method: ( event ) =>\n\n\t\t\tevent.preventDefault()\n\n\t\t\tbutton = $( event.currentTarget )\n\t\t\trow = button.parents( 'tr' )\n\n\t\t\t# check if the method belongs to this plugin\n\t\t\tif row.find( \"input[name=plugin-id][value=#{@slug}]\" ).length is 0\n\t\t\t\treturn\n\n\t\t\tthis.block_ui()\n\n\t\t\t# remove any previous errors\n\t\t\trow.next( '.error' ).remove()\n\n\t\t\tdata =\n\t\t\t\taction: \"wc_#{@id}_save_payment_method\"\n\t\t\t\tnonce: @ajax_nonce\n\t\t\t\ttoken_id: row.find( 'input[name=token-id]' ).val()\n\t\t\t\tdata: row.find( 'input[name]' ).serialize()\n\n\t\t\t$.post( @ajax_url, data )\n\n\t\t\t\t.done ( response ) =>\n\n\t\t\t\t\treturn this.display_error( row, response.data ) unless response.success\n\n\t\t\t\t\tif response.data.title?\n\t\t\t\t\t\trow.find('.woocommerce-PaymentMethod--method').html( response.data.title )\n\n\t\t\t\t\tif response.data.nonce?\n\t\t\t\t\t\t@ajax_nonce = response.data.nonce\n\n\t\t\t\t\t# change the \"Cancel\" button back to \"Edit\"\n\t\t\t\t\tbutton.siblings( '.cancel-edit' ).removeClass( 'cancel-edit' ).addClass( 'edit' ).text( @i18n.edit_button ).addClass( 'button' )\n\n\t\t\t\t\tthis.disable_editing_ui()\n\n\t\t\t\t.fail ( jqXHR, textStatus, error ) =>\n\n\t\t\t\t\tthis.display_error( row, error )\n\n\t\t\t\t.always =>\n\n\t\t\t\t\tthis.unblock_ui()\n\n\n\t\t# Cancels/stop editing a payment method.\n\t\t#\n\t\t# @since 5.1.0\n\t\t#\n\t\t# @param [Object] event jQuery event object\n\t\tcancel_edit: ( event ) =>\n\n\t\t\tevent.preventDefault()\n\n\t\t\tbutton = $( event.currentTarget )\n\t\t\trow = button.parents( 'tr' )\n\n\t\t\t# check if the method belongs to this plugin\n\t\t\tif row.find( \"input[name=plugin-id][value=#{@slug}]\" ).length is 0\n\t\t\t\treturn\n\n\t\t\trow.find( 'div.view' ).show()\n\t\t\trow.find( 'div.edit' ).hide()\n\t\t\trow.removeClass( 'editing' )\n\n\t\t\t# change the \"Cancel\" button back to \"Edit\"\n\t\t\tbutton.removeClass( 'cancel-edit' ).addClass( 'edit' ).text( @i18n.edit_button ).addClass( 'button' )\n\n\t\t\tthis.disable_editing_ui()\n\n\n\t\t# Sets the page UI to the \"editing\" state.\n\t\t#\n\t\t# This brings proper focus to the method being edited and prevents\n\t\t# other available buttons/actions until the editing is finished or cancelled.\n\t\t#\n\t\t# @since 5.1.1\n\t\tenable_editing_ui: ->\n\n\t\t\t# set the methods table as 'editing'\n\t\t\t$( \".woocommerce-MyAccount-paymentMethods\" ).addClass( 'editing' )\n\n\t\t\t# disable the Add Payment Method button\n\t\t\t$( '.button[href*=\"add-payment-method\"]' ).addClass( 'disabled' )\n\n\n\t\t# Sets the page UI back to the default state.\n\t\t#\n\t\t# @since 5.1.1\n\t\tdisable_editing_ui: ->\n\n\t\t\t# removes the methods table's \"editing\" status\n\t\t\t$( \".woocommerce-MyAccount-paymentMethods\" ).removeClass( 'editing' )\n\n\t\t\t# re-enable the Add Payment Method button\n\t\t\t$( '.button[href*=\"add-payment-method\"]' ).removeClass( 'disabled' )\n\n\n\t\t# Blocks the payment methods table UI.\n\t\t#\n\t\t# @since 5.1.0\n\t\tblock_ui: -> $( \".woocommerce-MyAccount-paymentMethods\" ).parent( 'div' ).block( message: null, overlayCSS: background: '#fff', opacity: 0.6 )\n\n\n\t\t# Unblocks the payment methods table UI.\n\t\t#\n\t\t# @since 5.1.0\n\t\tunblock_ui: -> $( \".woocommerce-MyAccount-paymentMethods\" ).parent( 'div' ).unblock()\n\n\n\t\t# Displays an error message to the user.\n\t\t#\n\t\t# @since 5.1.0\n\t\t#\n\t\t# @param [Object] row payment method table row\n\t\t# @param [String] error raw error message\n\t\t# @param [String] message user error message\n\t\tdisplay_error: ( row, error, message = '' ) ->\n\n\t\t\tconsole.error( error )\n\n\t\t\tmessage = @i18n.save_error unless message\n\t\t\tcolumns = $( \".woocommerce-MyAccount-paymentMethods thead tr th\" ).length\n\n\t\t\t$( '' + message + '' ).insertAfter( row ).find( 'td' ).delay( 8000 ).slideUp( 200 )\n\n\n\t# dispatch loaded event\n\t$( document.body ).trigger( 'sv_wc_payment_methods_handler_v5_11_10_loaded' )\n"]} +{"version":3,"sources":["frontend/sv-wc-payment-gateway-my-payment-methods.coffee"],"names":[],"mappings":";AAQA,SAAA,EAAA,GAAA,OAAA,EAAA,mBAAA,QAAA,iBAAA,OAAA,SAAA,SAAA,GAAA,cAAA,GAAA,SAAA,GAAA,OAAA,GAAA,mBAAA,QAAA,EAAA,cAAA,QAAA,IAAA,OAAA,UAAA,gBAAA,IAAA,GAAA,SAAA,EAAA,EAAA,GAAA,KAAA,aAAA,GAAA,MAAA,IAAA,UAAA,qCAAA,SAAA,EAAA,EAAA,GAAA,IAAA,IAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,CAAA,IAAA,EAAA,EAAA,GAAA,EAAA,WAAA,EAAA,aAAA,EAAA,EAAA,cAAA,EAAA,UAAA,IAAA,EAAA,UAAA,GAAA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EAAG,yCAA0C,OAAQ,OAAQ,MAAO,CAAA,QAAS,KAAM,WAAY,CAAA,WAAY,OAAQ,QAAS,QA3O3I,CAAA,IAAA,aAiPE,MAAA,WAAe,OAAA,EAAG,yCAA0C,OAAQ,OAAQ,YAjP9E,CAAA,IAAA,gBA2PE,MAAA,SAAiB,EAAK,GAAP,IAEjB,EAF+B,EAAA,UAAA,OAAA,QAAA,IAAA,UAAA,GAAA,UAAU,GAAA,GAOtC,OALA,QAAQ,MAAO,GAEmB,IAAlC,EAAU,KAAC,KAAK,YAChB,EAAU,EAAG,qDAAsD,OAEnE,EAAG,kCAAoC,EAAU,KAAO,EAAU,cAAe,YAAa,GAAM,KAAM,MAAO,MAAO,KAAO,QAAS,SAP1H,EArPH,GAgQb,EAAG,SAAS,MAAO,QAAS,oDAtQ7B,KAAA","file":"sv-wc-payment-gateway-my-payment-methods.js","sourceRoot":"../js","sourcesContent":["###\n WooCommerce SkyVerge Payment Gateway My Payment Methods CoffeeScript\n Version 5.1.0\n\n Copyright (c) 2014-2023, SkyVerge, Inc.\n Licensed under the GNU General Public License v3.0\n http://www.gnu.org/licenses/gpl-3.0.html\n###\njQuery ( $ ) ->\n\t\"use strict\"\n\n\t# The My Payment Methods handler.\n\t#\n\t# @since 5.1.0\n\tclass window.SV_WC_Payment_Methods_Handler_v5_11_11\n\n\n\t\t# Constructs the class.\n\t\t#\n\t\t# @since 5.1.0\n\t\t#\n\t\t# @param [Object] args, with the properties:\n\t\t# id: [String] plugin ID\n\t\t# slug: [String] plugin slug or dasherized ID\n\t\t# i18n: [Object] localized text strings\n\t\t# ajax_url: [String] URL for AJAX requests\n\t\t# ajax_nonce: [String] nonce for AJAX requests\n\t\tconstructor: ( args ) ->\n\n\t\t\t@id = args.id\n\t\t\t@slug = args.slug\n\t\t\t@i18n = args.i18n\n\t\t\t@ajax_url = args.ajax_url\n\t\t\t@ajax_nonce = args.ajax_nonce\n\n\t\t\t# replace the \"Method\" column content for FW tokens\n\t\t\tthis.replace_method_column()\n\n\t\t\t# remove duplicate \"Default\" marks\n\t\t\tthis.remove_duplicate_default_marks()\n\n\t\t\t# handle the edit action\n\t\t\t$( \".woocommerce-MyAccount-paymentMethods\" ).on( 'click', \".woocommerce-PaymentMethod--actions .button.edit\", ( event ) => this.edit_method( event ) )\n\n\t\t\t# handle the save action\n\t\t\t$( \".woocommerce-MyAccount-paymentMethods\" ).on( 'click', \".woocommerce-PaymentMethod--actions .button.save\", ( event ) => this.save_method( event ) )\n\n\t\t\t# handle the cancel action\n\t\t\t$( \".woocommerce-MyAccount-paymentMethods\" ).on( 'click', \".woocommerce-PaymentMethod--actions .cancel-edit\", ( event ) => this.cancel_edit( event ) )\n\n\t\t\t# handle the delete action\n\t\t\t$( \".woocommerce-MyAccount-paymentMethods\" ).on( 'click', \".woocommerce-PaymentMethod--actions .button.delete\", ( event ) =>\n\n\t\t\t\tbutton = $( event.currentTarget )\n\t\t\t\trow = button.parents( 'tr' )\n\n\t\t\t\t# check if the method belongs to this plugin\n\t\t\t\tif row.find( \"input[name=plugin-id][value=#{@slug}]\" ).length is 0\n\t\t\t\t\treturn\n\n\t\t\t\tif not confirm( @i18n.delete_ays )\n\t\t\t\t\tevent.preventDefault()\n\n\t\t\t)\n\n\t\t\t# don't follow the Add Payment Method button URL if it's disabled\n\t\t\t$( '.button[href*=\"add-payment-method\"]' ).click ( event ) ->\n\t\t\t\tevent.preventDefault() if $( this ).hasClass( 'disabled' )\n\n\n\t\t# Replace Method column content with Title column content, for FW tokens.\n\t\t#\n\t\t# @since 5.8.0\n\t\treplace_method_column: =>\n\n\t\t\t$( '.woocommerce-MyAccount-paymentMethods' ).find( 'tr' ).each ( index, element ) =>\n\n\t\t\t\t# check if the method belongs to this plugin\n\t\t\t\tif $( element ).find( \"input[name=plugin-id][value=#{@slug}]\" ).length is 0\n\t\t\t\t\treturn\n\n\t\t\t\t# delete the Title header\n\t\t\t\t$( element ).find( 'th.woocommerce-PaymentMethod--title' ).remove()\n\n\t\t\t\ttitleColumn = $( element ).find( 'td.woocommerce-PaymentMethod--title' )\n\n\t\t\t\t# Title column is not empty, this is a FW token\n\t\t\t\tif ( titleColumn.children().length > 0 )\n\n\t\t\t\t\t# replace Method column\n\t\t\t\t\t$( element ).find( 'td.woocommerce-PaymentMethod--method' ).html( titleColumn.html() )\n\n\t\t\t\t# delete Title column\n\t\t\t\t$( element ).find( 'td.woocommerce-PaymentMethod--title' ).remove()\n\n\n\t\t# Removes duplicate \"Default\" marks.\n\t\t#\n\t\t# They are already hidden using CSS, but should also be removed for accessibility.\n\t\t#\n\t\t# @since 5.8.0\n\t\tremove_duplicate_default_marks: =>\n\n\t\t\t$( '.woocommerce-MyAccount-paymentMethods' ).find( 'tr' ).each ( index, element ) =>\n\n\t\t\t\t$( element ).find( 'td.woocommerce-PaymentMethod--default' ).find( 'mark.default:not(:first-child)' ).remove()\n\n\n\t\t# Edits a payment method.\n\t\t#\n\t\t# @since 5.1.0\n\t\t#\n\t\t# @param [Object] event jQuery event object\n\t\tedit_method: ( event ) =>\n\n\t\t\tevent.preventDefault()\n\n\t\t\tbutton = $( event.currentTarget )\n\t\t\trow = button.parents( 'tr' )\n\n\t\t\t# check if the method belongs to this plugin\n\t\t\tif row.find( \"input[name=plugin-id][value=#{@slug}]\" ).length is 0\n\t\t\t\treturn\n\n\t\t\trow.find( 'div.view' ).hide()\n\t\t\trow.find( 'div.edit' ).show()\n\t\t\trow.addClass( 'editing' )\n\n\t\t\t# change the Edit button to \"Cancel\"\n\t\t\tbutton.text( @i18n.cancel_button ).removeClass( 'edit' ).addClass( 'cancel-edit' ).removeClass( 'button' )\n\n\t\t\tthis.enable_editing_ui()\n\n\n\t\t# Saves a payment method.\n\t\t#\n\t\t# @since 5.1.0\n\t\t#\n\t\t# @param [Object] event jQuery event object\n\t\tsave_method: ( event ) =>\n\n\t\t\tevent.preventDefault()\n\n\t\t\tbutton = $( event.currentTarget )\n\t\t\trow = button.parents( 'tr' )\n\n\t\t\t# check if the method belongs to this plugin\n\t\t\tif row.find( \"input[name=plugin-id][value=#{@slug}]\" ).length is 0\n\t\t\t\treturn\n\n\t\t\tthis.block_ui()\n\n\t\t\t# remove any previous errors\n\t\t\trow.next( '.error' ).remove()\n\n\t\t\tdata =\n\t\t\t\taction: \"wc_#{@id}_save_payment_method\"\n\t\t\t\tnonce: @ajax_nonce\n\t\t\t\ttoken_id: row.find( 'input[name=token-id]' ).val()\n\t\t\t\tdata: row.find( 'input[name]' ).serialize()\n\n\t\t\t$.post( @ajax_url, data )\n\n\t\t\t\t.done ( response ) =>\n\n\t\t\t\t\treturn this.display_error( row, response.data ) unless response.success\n\n\t\t\t\t\tif response.data.title?\n\t\t\t\t\t\trow.find('.woocommerce-PaymentMethod--method').html( response.data.title )\n\n\t\t\t\t\tif response.data.nonce?\n\t\t\t\t\t\t@ajax_nonce = response.data.nonce\n\n\t\t\t\t\t# change the \"Cancel\" button back to \"Edit\"\n\t\t\t\t\tbutton.siblings( '.cancel-edit' ).removeClass( 'cancel-edit' ).addClass( 'edit' ).text( @i18n.edit_button ).addClass( 'button' )\n\n\t\t\t\t\tthis.disable_editing_ui()\n\n\t\t\t\t.fail ( jqXHR, textStatus, error ) =>\n\n\t\t\t\t\tthis.display_error( row, error )\n\n\t\t\t\t.always =>\n\n\t\t\t\t\tthis.unblock_ui()\n\n\n\t\t# Cancels/stop editing a payment method.\n\t\t#\n\t\t# @since 5.1.0\n\t\t#\n\t\t# @param [Object] event jQuery event object\n\t\tcancel_edit: ( event ) =>\n\n\t\t\tevent.preventDefault()\n\n\t\t\tbutton = $( event.currentTarget )\n\t\t\trow = button.parents( 'tr' )\n\n\t\t\t# check if the method belongs to this plugin\n\t\t\tif row.find( \"input[name=plugin-id][value=#{@slug}]\" ).length is 0\n\t\t\t\treturn\n\n\t\t\trow.find( 'div.view' ).show()\n\t\t\trow.find( 'div.edit' ).hide()\n\t\t\trow.removeClass( 'editing' )\n\n\t\t\t# change the \"Cancel\" button back to \"Edit\"\n\t\t\tbutton.removeClass( 'cancel-edit' ).addClass( 'edit' ).text( @i18n.edit_button ).addClass( 'button' )\n\n\t\t\tthis.disable_editing_ui()\n\n\n\t\t# Sets the page UI to the \"editing\" state.\n\t\t#\n\t\t# This brings proper focus to the method being edited and prevents\n\t\t# other available buttons/actions until the editing is finished or cancelled.\n\t\t#\n\t\t# @since 5.1.1\n\t\tenable_editing_ui: ->\n\n\t\t\t# set the methods table as 'editing'\n\t\t\t$( \".woocommerce-MyAccount-paymentMethods\" ).addClass( 'editing' )\n\n\t\t\t# disable the Add Payment Method button\n\t\t\t$( '.button[href*=\"add-payment-method\"]' ).addClass( 'disabled' )\n\n\n\t\t# Sets the page UI back to the default state.\n\t\t#\n\t\t# @since 5.1.1\n\t\tdisable_editing_ui: ->\n\n\t\t\t# removes the methods table's \"editing\" status\n\t\t\t$( \".woocommerce-MyAccount-paymentMethods\" ).removeClass( 'editing' )\n\n\t\t\t# re-enable the Add Payment Method button\n\t\t\t$( '.button[href*=\"add-payment-method\"]' ).removeClass( 'disabled' )\n\n\n\t\t# Blocks the payment methods table UI.\n\t\t#\n\t\t# @since 5.1.0\n\t\tblock_ui: -> $( \".woocommerce-MyAccount-paymentMethods\" ).parent( 'div' ).block( message: null, overlayCSS: background: '#fff', opacity: 0.6 )\n\n\n\t\t# Unblocks the payment methods table UI.\n\t\t#\n\t\t# @since 5.1.0\n\t\tunblock_ui: -> $( \".woocommerce-MyAccount-paymentMethods\" ).parent( 'div' ).unblock()\n\n\n\t\t# Displays an error message to the user.\n\t\t#\n\t\t# @since 5.1.0\n\t\t#\n\t\t# @param [Object] row payment method table row\n\t\t# @param [String] error raw error message\n\t\t# @param [String] message user error message\n\t\tdisplay_error: ( row, error, message = '' ) ->\n\n\t\t\tconsole.error( error )\n\n\t\t\tmessage = @i18n.save_error unless message\n\t\t\tcolumns = $( \".woocommerce-MyAccount-paymentMethods thead tr th\" ).length\n\n\t\t\t$( '' + message + '' ).insertAfter( row ).find( 'td' ).delay( 8000 ).slideUp( 200 )\n\n\n\t# dispatch loaded event\n\t$( document.body ).trigger( 'sv_wc_payment_methods_handler_v5_11_11_loaded' )\n"]} diff --git a/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-payment-form.js b/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-payment-form.js index de348dc79..8b8276ed2 100644 --- a/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-payment-form.js +++ b/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-payment-form.js @@ -1,4 +1,4 @@ parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c0&&e.trigger("change"),r.val()&&r.val().length>0&&r.trigger("change"),t.val()&&t.val().length>0&&t.trigger("change"),a(".js-sv-wc-payment-gateway-credit-card-form-input").on("change paste keyup",function(){return n.do_inline_credit_card_validation()})}},{key:"do_inline_credit_card_validation",value:function(){var t,r,n,i;return t=a(".js-sv-wc-payment-gateway-credit-card-form-account-number"),i=a(".js-sv-wc-payment-gateway-credit-card-form-expiry"),n=a(".js-sv-wc-payment-gateway-credit-card-form-csc"),r=a.payment.cardType(t.val()),e.call(this.enabled_card_types,r)<0?t.addClass("invalid-card-type"):t.removeClass("invalid-card-type"),a.payment.validateCardExpiry(i.payment("cardExpiryVal"))?i.addClass("identified"):i.removeClass("identified"),a.payment.validateCardCVC(n.val())?n.addClass("identified"):n.removeClass("identified")}},{key:"validate_card_data",value:function(){var e,t,r,n;return r=[],null!=(t=this.payment_fields.find(".js-sv-wc-payment-gateway-credit-card-form-csc").val())&&(t?(/\D/.test(t)&&r.push(this.params.cvv_digits_invalid),(t.length<3||t.length>4)&&r.push(this.params.cvv_length_invalid)):this.csc_required&&(this.saved_payment_method_selected&&!this.csc_required_for_tokens||r.push(this.params.cvv_missing))),this.saved_payment_method_selected||(e=this.payment_fields.find(".js-sv-wc-payment-gateway-credit-card-form-account-number").val(),n=a.payment.cardExpiryVal(this.payment_fields.find(".js-sv-wc-payment-gateway-credit-card-form-expiry").val()),(e=e.replace(/-|\s/g,""))?((e.length<12||e.length>19)&&r.push(this.params.card_number_length_invalid),/\D/.test(e)&&r.push(this.params.card_number_digits_invalid),a.payment.validateCardNumber(e)||r.push(this.params.card_number_invalid)):r.push(this.params.card_number_missing),a.payment.validateCardExpiry(n)||r.push(this.params.card_exp_date_invalid)),r.length>0?(this.render_errors(r),!1):(this.payment_fields.find(".js-sv-wc-payment-gateway-credit-card-form-account-number").val(e),!0)}},{key:"validate_account_data",value:function(){var e,t,a;return!!this.saved_payment_method_selected||(t=[],a=this.payment_fields.find(".js-sv-wc-payment-gateway-echeck-form-routing-number").val(),e=this.payment_fields.find(".js-sv-wc-payment-gateway-echeck-form-account-number").val(),a?(9!==a.length&&t.push(this.params.routing_number_length_invalid),/\D/.test(a)&&t.push(this.params.routing_number_digits_invalid)):t.push(this.params.routing_number_missing),e?((e.length<3||e.length>17)&&t.push(this.params.account_number_length_invalid),/\D/.test(e)&&t.push(this.params.account_number_invalid)):t.push(this.params.account_number_missing),t.length>0?(this.render_errors(t),!1):(this.payment_fields.find(".js-sv-wc-payment-gateway-echeck-form-account-number").val(e),!0))}},{key:"render_errors",value:function(e){return a(".woocommerce-error, .woocommerce-message").remove(),this.form.prepend('
    • '+e.join("
    • ")+"
    "),this.form.removeClass("processing").unblock(),this.form.find(".input-text, select").blur(),a("html, body").animate({scrollTop:this.form.offset().top-100},1e3)}},{key:"handle_saved_payment_methods",value:function(){var e,t,r,n;if(n=this.id_dasherized,this.csc_required,r=this.csc_required_for_tokens,t=a("div.js-wc-".concat(n,"-new-payment-method-form")),e=t.find(".js-sv-wc-payment-gateway-credit-card-form-csc").closest(".form-row"),a("input.js-wc-".concat(this.id_dasherized,"-payment-token")).change(function(){if(a("input.js-wc-".concat(n,"-payment-token:checked")).val()){if(t.slideUp(200),r)return e.removeClass("form-row-last").addClass("form-row-first"),t.after(e)}else if(t.slideDown(200),r)return e.removeClass("form-row-first").addClass("form-row-last"),t.find(".js-sv-wc-payment-gateway-credit-card-form-expiry").closest(".form-row").after(e)}).change(),a("input#createaccount").change(function(){var e;return e=a("input.js-wc-".concat(n,"-tokenize-payment-method")).closest("p.form-row"),a(this).is(":checked")?(e.slideDown(),e.next().show()):(e.hide(),e.next().hide())}),!a("input#createaccount").is(":checked"))return a("input#createaccount").change()}},{key:"handle_sample_check_hint",value:function(){var e;return(e=this.payment_fields.find(".js-sv-wc-payment-gateway-echeck-form-sample-check")).is(":visible")?e.slideUp():e.slideDown()}},{key:"block_ui",value:function(){return this.form.block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}},{key:"unblock_ui",value:function(){return this.form.unblock()}}]),n}(),a(document.body).trigger("sv_wc_payment_form_handler_v5_11_10_loaded")})}).call(this); +function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var a=0;a0&&e.trigger("change"),r.val()&&r.val().length>0&&r.trigger("change"),t.val()&&t.val().length>0&&t.trigger("change"),a(".js-sv-wc-payment-gateway-credit-card-form-input").on("change paste keyup",function(){return n.do_inline_credit_card_validation()})}},{key:"do_inline_credit_card_validation",value:function(){var t,r,n,i;return t=a(".js-sv-wc-payment-gateway-credit-card-form-account-number"),i=a(".js-sv-wc-payment-gateway-credit-card-form-expiry"),n=a(".js-sv-wc-payment-gateway-credit-card-form-csc"),r=a.payment.cardType(t.val()),e.call(this.enabled_card_types,r)<0?t.addClass("invalid-card-type"):t.removeClass("invalid-card-type"),a.payment.validateCardExpiry(i.payment("cardExpiryVal"))?i.addClass("identified"):i.removeClass("identified"),a.payment.validateCardCVC(n.val())?n.addClass("identified"):n.removeClass("identified")}},{key:"validate_card_data",value:function(){var e,t,r,n;return r=[],null!=(t=this.payment_fields.find(".js-sv-wc-payment-gateway-credit-card-form-csc").val())&&(t?(/\D/.test(t)&&r.push(this.params.cvv_digits_invalid),(t.length<3||t.length>4)&&r.push(this.params.cvv_length_invalid)):this.csc_required&&(this.saved_payment_method_selected&&!this.csc_required_for_tokens||r.push(this.params.cvv_missing))),this.saved_payment_method_selected||(e=this.payment_fields.find(".js-sv-wc-payment-gateway-credit-card-form-account-number").val(),n=a.payment.cardExpiryVal(this.payment_fields.find(".js-sv-wc-payment-gateway-credit-card-form-expiry").val()),(e=e.replace(/-|\s/g,""))?((e.length<12||e.length>19)&&r.push(this.params.card_number_length_invalid),/\D/.test(e)&&r.push(this.params.card_number_digits_invalid),a.payment.validateCardNumber(e)||r.push(this.params.card_number_invalid)):r.push(this.params.card_number_missing),a.payment.validateCardExpiry(n)||r.push(this.params.card_exp_date_invalid)),r.length>0?(this.render_errors(r),!1):(this.payment_fields.find(".js-sv-wc-payment-gateway-credit-card-form-account-number").val(e),!0)}},{key:"validate_account_data",value:function(){var e,t,a;return!!this.saved_payment_method_selected||(t=[],a=this.payment_fields.find(".js-sv-wc-payment-gateway-echeck-form-routing-number").val(),e=this.payment_fields.find(".js-sv-wc-payment-gateway-echeck-form-account-number").val(),a?(9!==a.length&&t.push(this.params.routing_number_length_invalid),/\D/.test(a)&&t.push(this.params.routing_number_digits_invalid)):t.push(this.params.routing_number_missing),e?((e.length<3||e.length>17)&&t.push(this.params.account_number_length_invalid),/\D/.test(e)&&t.push(this.params.account_number_invalid)):t.push(this.params.account_number_missing),t.length>0?(this.render_errors(t),!1):(this.payment_fields.find(".js-sv-wc-payment-gateway-echeck-form-account-number").val(e),!0))}},{key:"render_errors",value:function(e){return a(".woocommerce-error, .woocommerce-message").remove(),this.form.prepend('
    • '+e.join("
    • ")+"
    "),this.form.removeClass("processing").unblock(),this.form.find(".input-text, select").blur(),a("html, body").animate({scrollTop:this.form.offset().top-100},1e3)}},{key:"handle_saved_payment_methods",value:function(){var e,t,r,n;if(n=this.id_dasherized,this.csc_required,r=this.csc_required_for_tokens,t=a("div.js-wc-".concat(n,"-new-payment-method-form")),e=t.find(".js-sv-wc-payment-gateway-credit-card-form-csc").closest(".form-row"),a("input.js-wc-".concat(this.id_dasherized,"-payment-token")).change(function(){if(a("input.js-wc-".concat(n,"-payment-token:checked")).val()){if(t.slideUp(200),r)return e.removeClass("form-row-last").addClass("form-row-first"),t.after(e)}else if(t.slideDown(200),r)return e.removeClass("form-row-first").addClass("form-row-last"),t.find(".js-sv-wc-payment-gateway-credit-card-form-expiry").closest(".form-row").after(e)}).change(),a("input#createaccount").change(function(){var e;return e=a("input.js-wc-".concat(n,"-tokenize-payment-method")).closest("p.form-row"),a(this).is(":checked")?(e.slideDown(),e.next().show()):(e.hide(),e.next().hide())}),!a("input#createaccount").is(":checked"))return a("input#createaccount").change()}},{key:"handle_sample_check_hint",value:function(){var e;return(e=this.payment_fields.find(".js-sv-wc-payment-gateway-echeck-form-sample-check")).is(":visible")?e.slideUp():e.slideDown()}},{key:"block_ui",value:function(){return this.form.block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}},{key:"unblock_ui",value:function(){return this.form.unblock()}}]),n}(),a(document.body).trigger("sv_wc_payment_form_handler_v5_11_11_loaded")})}).call(this); },{}]},{},["JA8d"], null) //# sourceMappingURL=../frontend/sv-wc-payment-gateway-payment-form.js.map diff --git a/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-payment-form.js.map b/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-payment-form.js.map index 2b33a9a3d..aae86d467 100644 --- a/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-payment-form.js.map +++ b/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-payment-form.js.map @@ -1 +1 @@ -{"version":3,"sources":["frontend/sv-wc-payment-gateway-payment-form.coffee"],"names":[],"mappings":";AAQA,SAAA,EAAA,GAAA,OAAA,EAAA,mBAAA,QAAA,iBAAA,OAAA,SAAA,SAAA,GAAA,cAAA,GAAA,SAAA,GAAA,OAAA,GAAA,mBAAA,QAAA,EAAA,cAAA,QAAA,IAAA,OAAA,UAAA,gBAAA,IAAA,GAAA,SAAA,EAAA,EAAA,GAAA,KAAA,aAAA,GAAA,MAAA,IAAA,UAAA,qCAAA,SAAA,EAAA,EAAA,GAAA,IAAA,IAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,CAAA,IAAA,EAAA,EAAA,GAAA,EAAA,WAAA,EAAA,aAAA,EAAA,EAAA,cAAA,EAAA,UAAA,IAAA,EAAA,UAAA,GAAA,OAAA,eAAA,EAAA,EAAA,EAAA,KAAA,IAAA,SAAA,EAAA,EAAA,EAAA,GAAA,OAAA,GAAA,EAAA,EAAA,UAAA,GAAA,GAAA,EAAA,EAAA,GAAA,OAAA,eAAA,EAAA,YAAA,CAAA,UAAA,IAAA,EAAA,SAAA,EAAA,GAAA,IAAA,EAAA,EAAA,EAAA,UAAA,MAAA,WAAA,EAAA,GAAA,EAAA,OAAA,GAAA,SAAA,EAAA,EAAA,GAAA,GAAA,WAAA,EAAA,IAAA,OAAA,EAAA,OAAA,EAAA,IAAA,EAAA,EAAA,OAAA,aAAA,QAAA,IAAA,EAAA,CAAA,IAAA,EAAA,EAAA,KAAA,EAAA,GAAA,WAAA,GAAA,WAAA,EAAA,GAAA,OAAA,EAAA,MAAA,IAA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,aAAc,MAAO,KAC1H,SAID,EAAG,uBAAwB,OAAO,WACrC,IAAA,EAEI,OAFA,EAAc,EAAA,eAAA,OAAmB,EAAnB,6BAA8D,QAAS,cAElF,EAAG,MAAO,GAAI,aAChB,EAAY,YACZ,EAAY,OAAO,SAEnB,EAAY,OACZ,EAAY,OAAO,WAEsB,EAAG,uBAAwB,GAAI,YAA1E,OAAA,EAAG,uBAAwB,WAhW9B,CAAA,IAAA,2BAsWE,MAAA,WAEF,IAAA,EAEG,OAFA,EAAgB,KAAC,eAAe,KAAM,uDAErB,GAAI,YAAkB,EAAc,UAAe,EAAc,cA1WrF,CAAA,IAAA,WAiXE,MAAA,WAAa,OAAA,KAAC,KAAK,MAAO,CAAA,QAAS,KAAM,WAAY,CAAA,WAAY,OAAO,QAAS,QAjXnF,CAAA,IAAA,aAuXE,MAAA,WAAe,OAAA,KAAC,KAAK,cAAT,EAnXA,GAuXb,EAAG,SAAS,MAAO,QAAS,iDA3X7B,KAAA","file":"sv-wc-payment-gateway-payment-form.js","sourceRoot":"../js","sourcesContent":["###\n WooCommerce SkyVerge Payment Gateway Framework Payment Form CoffeeScript\n Version 4.3.0-beta\n\n Copyright (c) 2014-2023, SkyVerge, Inc.\n Licensed under the GNU General Public License v3.0\n http://www.gnu.org/licenses/gpl-3.0.html\n###\njQuery ( $ ) ->\n\t\"use strict\"\n\n\n\tclass window.SV_WC_Payment_Form_Handler_v5_11_10\n\n\n\t\t# Public: Instantiate Payment Form Handler\n\t\t#\n\t\t# args - object with properties:\n\t\t# id - gateway ID\n\t\t# id_dasherized - gateway ID dasherized\n\t\t# plugin_id - plugin ID\n\t\t# type - gateway type, either `credit-card` or `echeck`\n\t\t# csc_required - true if the gateway requires the CSC field to be displayed\n\t\t#\n\t\t# Returns SV_WC_Payment_Form_Handler_v5_11_10 instance\n\t\tconstructor: (args) ->\n\n\t\t\t@id = args.id\n\t\t\t@id_dasherized = args.id_dasherized\n\t\t\t@plugin_id = args.plugin_id\n\t\t\t@type = args.type\n\t\t\t@csc_required = args.csc_required\n\t\t\t@csc_required_for_tokens = args.csc_required_for_tokens\n\t\t\t@enabled_card_types = args.enabled_card_types\n\n\t\t\t# which payment form?\n\t\t\tif $( 'form.checkout' ).length\n\t\t\t\t@form = $( 'form.checkout' )\n\t\t\t\tthis.handle_checkout_page()\n\n\t\t\telse if $( 'form#order_review' ).length\n\t\t\t\t@form = $( 'form#order_review' )\n\t\t\t\tthis.handle_pay_page()\n\n\t\t\telse if $( 'form#add_payment_method' ).length\n\t\t\t\t@form = $( 'form#add_payment_method' )\n\t\t\t\tthis.handle_add_payment_method_page()\n\n\t\t\telse\n\t\t\t\tconsole.log( 'No payment form found!' )\n\t\t\t\treturn\n\n\t\t\t# localized error messages\n\t\t\t@params = window[ \"sv_wc_payment_gateway_payment_form_params\" ]\n\n\t\t\t# handle sample check image hint\n\t\t\t@form.on( 'click', '.js-sv-wc-payment-gateway-echeck-form-check-hint, .js-sv-wc-payment-gateway-echeck-form-sample-check', => this.handle_sample_check_hint() ) if @type is 'echeck'\n\n\t\t\t$( document ).trigger( 'sv_wc_payment_form_handler_init', { id: @id, instance: @ } )\n\n\n\t\t# Public: Handle required actions on the checkout page\n\t\t#\n\t\t# Returns nothing.\n\t\thandle_checkout_page: ->\n\n\t\t\t# format/validate credit card inputs using jQuery.payment\n\t\t\t$( document.body ).on( 'updated_checkout', => this.format_credit_card_inputs() ) if @type is 'credit-card'\n\n\t\t\t# updated payment fields jQuery object on each checkout update (prevents stale data)\n\t\t\t$( document.body ).on( 'updated_checkout', => this.set_payment_fields() )\n\n\t\t\t# handle saved payment methods\n\t\t\t# note on the checkout page, this is bound to `updated_checkout` so it\n\t\t\t# fires even when other parts of the checkout are changed\n\t\t\t$( document.body ).on( 'updated_checkout', => this.handle_saved_payment_methods() )\n\n\t\t\t# validate payment data before order is submitted\n\t\t\t@form.on( \"checkout_place_order_#{ @id }\", => this.validate_payment_data() )\n\n\n\t\t# Public: Handle required actions on the Order > Pay page\n\t\t#\n\t\t# Returns nothing.\n\t\thandle_pay_page: ->\n\n\t\t\tthis.set_payment_fields()\n\n\t\t\t# format/validate credit card inputs using jQuery.payment\n\t\t\tif @type is 'credit-card'\n\t\t\t\tthis.format_credit_card_inputs()\n\n\t\t\t# handle saved payment methods\n\t\t\tthis.handle_saved_payment_methods()\n\n\t\t\t# validate payment data before order is submitted\n\t\t\t@form.submit =>\n\n\t\t\t\t# but only when one of our payment gateways is selected\n\t\t\t\treturn this.validate_payment_data() if $( '#order_review input[name=payment_method]:checked' ).val() is @id\n\n\n\t\t# Public: Handle required actions on the Add Payment Method page\n\t\t#\n\t\t# Returns nothing.\n\t\thandle_add_payment_method_page: ->\n\n\t\t\tthis.set_payment_fields()\n\n\t\t\t# format/validate credit card inputs using jQuery.payment\n\t\t\tif @type is 'credit-card'\n\t\t\t\tthis.format_credit_card_inputs()\n\n\t\t\t# validate payment data before order is submitted\n\t\t\t@form.submit =>\n\n\t\t\t\t# but only when one of our payment gateways is selected\n\t\t\t\treturn this.validate_payment_data() if $( '#add_payment_method input[name=payment_method]:checked' ).val() is @id\n\n\n\t\t# Public: Set payment fields class variable, this is done\n\t\t# during the updated_checkout event as otherwise the reference to\n\t\t# the checkout fields becomes stale (somehow ¯\\_(ツ)_/¯)\n\t\t#\n\t\t# This ensures payment fields are not marked as \"invalid\" before the customer has interacted with them.\n\t\t#\n\t\t# Returns nothing.\n\t\tset_payment_fields: ->\n\n\t\t\t@payment_fields = $( \".payment_method_#{ @id }\" )\n\n\t\t\t$required_fields = @payment_fields.find( '.validate-required .input-text' )\n\n\t\t\t$required_fields.each( ( i, input ) =>\n\n\t\t\t\t# if any of the required fields have a value, bail this loop and proceed with WooCommerce validation\n\t\t\t\tif $( input ).val()\n\t\t\t\t\treturn false\n\n\t\t\t\t# otherwise remove all validation result classes from the inputs, since the form is freshly loaded\n\t\t\t\t$( input ).trigger( 'input' )\n\t\t\t)\n\n\n\t\t# Public: Validate Payment data when order is placed\n\t\t#\n\t\t# Returns boolean, true if payment data is valid, false otherwise\n\t\tvalidate_payment_data: ->\n\n\t\t\t# bail when already processing\n\t\t\treturn false if @form.is( '.processing' )\n\n\t\t\t@saved_payment_method_selected = @payment_fields.find( '.js-sv-wc-payment-gateway-payment-token:checked' ).val()\n\n\t\t\t# perform internal validations (all fields present & valid, etc)\n\t\t\tvalid = if @type is 'credit-card' then this.validate_card_data() else this.validate_account_data()\n\n\t\t\t# let gateways perform their own validation prior to form submission\n\t\t\thandler = $( document.body ).triggerHandler( 'sv_wc_payment_form_valid_payment_data', { payment_form: this, passed_validation: valid } ) isnt false\n\n\t\t\treturn valid && handler\n\n\n\t\t# Public: format card data using jQuery.Payment\n\t\t#\n\t\t# Returns nothing.\n\t\tformat_credit_card_inputs: ->\n\t\t\t$card_number = $('.js-sv-wc-payment-gateway-credit-card-form-account-number').payment('formatCardNumber');\n\t\t\t$expiry = $('.js-sv-wc-payment-gateway-credit-card-form-expiry').payment('formatCardExpiry');\n\t\t\t$csc = $('.js-sv-wc-payment-gateway-credit-card-form-csc').payment('formatCardCVC');\n\n\t\t\t# trigger a 'change' event for non empty fields only\n\t\t\t$card_number.trigger( 'change') if $card_number.val() && $card_number.val().length > 0\n\t\t\t$expiry.trigger( 'change') if $expiry.val() && $expiry.val().length > 0\n\t\t\t$csc.trigger( 'change') if $csc.val() && $csc.val().length > 0\n\n\t\t\t# perform inline validation on credit card inputs\n\t\t\t$( '.js-sv-wc-payment-gateway-credit-card-form-input' ).on( 'change paste keyup', => this.do_inline_credit_card_validation() )\n\n\n\t\t# Public: perform inline validation on credit card fields\n\t\t#\n\t\t# Returns nothing.\n\t\tdo_inline_credit_card_validation: ->\n\n\t\t\t$card_number = $( '.js-sv-wc-payment-gateway-credit-card-form-account-number' )\n\t\t\t$expiry = $( '.js-sv-wc-payment-gateway-credit-card-form-expiry' )\n\t\t\t$csc = $( '.js-sv-wc-payment-gateway-credit-card-form-csc' )\n\n\t\t\t$card_type = $.payment.cardType( $card_number.val() )\n\n\t\t\tif $card_type not in @enabled_card_types\n\t\t\t\t$card_number.addClass( 'invalid-card-type' )\n\t\t\telse\n\t\t\t\t$card_number.removeClass( 'invalid-card-type' )\n\n\t\t\tif $.payment.validateCardExpiry( $expiry.payment( 'cardExpiryVal' ) )\n\t\t\t\t$expiry.addClass( 'identified' )\n\t\t\telse\n\t\t\t\t$expiry.removeClass( 'identified' )\n\n\t\t\tif $.payment.validateCardCVC( $csc.val() )\n\t\t\t\t$csc.addClass( 'identified' )\n\t\t\telse\n\t\t\t\t$csc.removeClass( 'identified' )\n\n\n\t\t# Public: Perform validation on the credit card info entered\n\t\t#\n\t\t# Return boolean, true if credit card info is valid, false otherwise\n\t\tvalidate_card_data: ->\n\n\t\t\terrors = []\n\n\t\t\tcsc = @payment_fields.find( '.js-sv-wc-payment-gateway-credit-card-form-csc' ).val()\n\n\t\t\t# always validate the CSC if present\n\t\t\tif csc?\n\n\t\t\t\tif csc\n\t\t\t\t\terrors.push( @params.cvv_digits_invalid ) if /\\D/.test( csc )\n\t\t\t\t\terrors.push( @params.cvv_length_invalid ) if csc.length < 3 || csc.length > 4\n\t\t\t\telse if @csc_required\n\t\t\t\t\tif not @saved_payment_method_selected or @csc_required_for_tokens\n\t\t\t\t\t\terrors.push( @params.cvv_missing )\n\n\t\t\t# Only validate the other CC fields if necessary\n\t\t\tif not @saved_payment_method_selected\n\n\t\t\t\taccount_number = @payment_fields.find( '.js-sv-wc-payment-gateway-credit-card-form-account-number' ).val()\n\t\t\t\texpiry = $.payment.cardExpiryVal( @payment_fields.find( '.js-sv-wc-payment-gateway-credit-card-form-expiry' ).val() )\n\n\t\t\t\t# replace any dashes or spaces in the card number\n\t\t\t\taccount_number = account_number.replace( /-|\\s/g, '' )\n\n\t\t\t\t# validate card number\n\t\t\t\tif not account_number\n\t\t\t\t\terrors.push( @params.card_number_missing )\n\t\t\t\telse\n\t\t\t\t\terrors.push( @params.card_number_length_invalid ) if account_number.length < 12 || account_number.length > 19\n\t\t\t\t\terrors.push( @params.card_number_digits_invalid ) if /\\D/.test( account_number )\n\t\t\t\t\terrors.push( @params.card_number_invalid ) unless $.payment.validateCardNumber( account_number ) # performs luhn check\n\n\t\t\t\t# validate expiration date\n\t\t\t\terrors.push( @params.card_exp_date_invalid ) unless $.payment.validateCardExpiry( expiry ) # validates future date\n\n\t\t\tif errors.length > 0\n\t\t\t\tthis.render_errors( errors )\n\t\t\t\treturn false\n\t\t\telse\n\t\t\t\t# get rid of any space/dash characters\n\t\t\t\t@payment_fields.find( '.js-sv-wc-payment-gateway-credit-card-form-account-number' ).val( account_number )\n\t\t\t\treturn true\n\n\n\t\t# Public: Perform validation on the eCheck info entered\n\t\t#\n\t\t# Return boolean, true if eCheck info is valid, false otherwise\n\t\tvalidate_account_data: ->\n\n\t\t\treturn true if @saved_payment_method_selected\n\n\t\t\terrors = []\n\n\t\t\trouting_number = @payment_fields.find('.js-sv-wc-payment-gateway-echeck-form-routing-number').val()\n\t\t\taccount_number = @payment_fields.find('.js-sv-wc-payment-gateway-echeck-form-account-number').val()\n\n\t\t\t# validate routing number\n\t\t\tif not routing_number\n\t\t\t\terrors.push( @params.routing_number_missing )\n\t\t\telse\n\t\t\t\terrors.push( @params.routing_number_length_invalid ) if 9 != routing_number.length\n\t\t\t\terrors.push( @params.routing_number_digits_invalid ) if /\\D/.test( routing_number )\n\n\t\t\t# validate account number\n\t\t\tif not account_number\n\t\t\t\terrors.push( @params.account_number_missing )\n\t\t\telse\n\t\t\t\terrors.push( @params.account_number_length_invalid ) if account_number.length < 3 || account_number.length > 17\n\t\t\t\terrors.push( @params.account_number_invalid ) if /\\D/.test( account_number )\n\n\t\t\tif errors.length > 0\n\t\t\t\tthis.render_errors( errors )\n\t\t\t\treturn false\n\t\t\telse\n\t\t\t\t# get rid of any space/dash characters\n\t\t\t\t@payment_fields.find( '.js-sv-wc-payment-gateway-echeck-form-account-number' ).val( account_number )\n\t\t\t\treturn true\n\n\n\t\t# Public: Render any new errors and bring them into the viewport\n\t\t#\n\t\t# Returns nothing.\n\t\trender_errors: (errors) ->\n\n\t\t\t# hide and remove any previous errors\n\t\t\t$( '.woocommerce-error, .woocommerce-message' ).remove()\n\n\t\t\t# add errors\n\t\t\t@form.prepend '
    • ' + errors.join( '
    • ' ) + '
    '\n\n\t\t\t# unblock UI\n\t\t\t@form.removeClass( 'processing' ).unblock()\n\t\t\t@form.find( '.input-text, select' ).blur()\n\n\t\t\t# scroll to top\n\t\t\t$( 'html, body' ).animate( { scrollTop: @form.offset().top - 100 }, 1000 )\n\n\n\t\t# Public: Handle associated actions for saved payment methods\n\t\t#\n\t\t# Returns nothing.\n\t\thandle_saved_payment_methods: ->\n\n\t\t\t# make available inside change events\n\t\t\tid_dasherized = @id_dasherized\n\n\t\t\tcsc_required = @csc_required\n\t\t\tcsc_required_for_tokens = @csc_required_for_tokens\n\n\t\t\t$new_payment_method_selection = $( \"div.js-wc-#{ id_dasherized }-new-payment-method-form\" )\n\t\t\t$csc_field = $new_payment_method_selection.find( '.js-sv-wc-payment-gateway-credit-card-form-csc' ).closest( '.form-row' )\n\n\t\t\t# show/hide the saved payment methods when a saved payment method is de-selected/selected\n\t\t\t$( \"input.js-wc-#{ @id_dasherized }-payment-token\" ).change ->\n\n\t\t\t\ttokenized_payment_method_selected = $( \"input.js-wc-#{ id_dasherized }-payment-token:checked\" ).val()\n\n\t\t\t\tif tokenized_payment_method_selected\n\n\t\t\t\t\t# using an existing tokenized payment method, hide the 'new method' fields\n\t\t\t\t\t$new_payment_method_selection.slideUp( 200 )\n\n\t\t\t\t\t# move the CSC field out of the 'new method' fields so it can be used with the tokenized transaction\n\t\t\t\t\tif csc_required_for_tokens\n\t\t\t\t\t\t$csc_field.removeClass( 'form-row-last' ).addClass( 'form-row-first' )\n\t\t\t\t\t\t$new_payment_method_selection.after( $csc_field )\n\n\t\t\t\telse\n\t\t\t\t\t# use new payment method, display the 'new method' fields\n\t\t\t\t\t$new_payment_method_selection.slideDown( 200 )\n\n\t\t\t\t\t# move the CSC field back into its regular spot\n\t\t\t\t\tif csc_required_for_tokens\n\t\t\t\t\t\t$csc_field.removeClass( 'form-row-first' ).addClass( 'form-row-last' )\n\t\t\t\t\t\t$new_payment_method_selection.find( '.js-sv-wc-payment-gateway-credit-card-form-expiry' ).closest( '.form-row' ).after( $csc_field )\n\t\t\t.change()\n\n\t\t\t# display the 'save payment method' option for guest checkouts if the 'create account' option is checked\n\t\t\t# but only hide the input if there is a 'create account' checkbox (some themes just display the password)\n\t\t\t$( 'input#createaccount' ).change ->\n\t\t\t\t$parent_row = $( \"input.js-wc-#{ id_dasherized }-tokenize-payment-method\" ).closest( 'p.form-row' )\n\n\t\t\t\tif $( this ).is( ':checked' )\n\t\t\t\t\t$parent_row.slideDown()\n\t\t\t\t\t$parent_row.next().show()\n\t\t\t\telse\n\t\t\t\t\t$parent_row.hide()\n\t\t\t\t\t$parent_row.next().hide()\n\n\t\t\t$( 'input#createaccount' ).change() unless $( 'input#createaccount' ).is( ':checked' )\n\n\n\t\t# Public: Handle showing/hiding the sample check image\n\t\t#\n\t\t# Returns nothing.\n\t\thandle_sample_check_hint: ->\n\n\t\t\t$sample_check = @payment_fields.find( '.js-sv-wc-payment-gateway-echeck-form-sample-check' )\n\n\t\t\tif $sample_check.is( \":visible\" ) then $sample_check.slideUp() else $sample_check.slideDown()\n\n\n\n\t\t# Blocks the payment form UI\n\t\t#\n\t\t# @since 3.0.0\n\t\tblock_ui: -> @form.block( message: null, overlayCSS: background: '#fff',opacity: 0.6 )\n\n\n\t\t# Unblocks the payment form UI\n\t\t#\n\t\t# @since 3.0.0\n\t\tunblock_ui: -> @form.unblock()\n\n\n\t# dispatch loaded event\n\t$( document.body ).trigger( \"sv_wc_payment_form_handler_v5_11_10_loaded\" )\n"]} +{"version":3,"sources":["frontend/sv-wc-payment-gateway-payment-form.coffee"],"names":[],"mappings":";AAQA,SAAA,EAAA,GAAA,OAAA,EAAA,mBAAA,QAAA,iBAAA,OAAA,SAAA,SAAA,GAAA,cAAA,GAAA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E,MAAA,WAAa,OAAA,KAAC,KAAK,MAAO,CAAA,QAAS,KAAM,WAAY,CAAA,WAAY,OAAO,QAAS,QAjXnF,CAAA,IAAA,aAuXE,MAAA,WAAe,OAAA,KAAC,KAAK,cAAT,EAnXA,GAuXb,EAAG,SAAS,MAAO,QAAS,iDA3X7B,KAAA","file":"sv-wc-payment-gateway-payment-form.js","sourceRoot":"../js","sourcesContent":["###\n WooCommerce SkyVerge Payment Gateway Framework Payment Form CoffeeScript\n Version 4.3.0-beta\n\n Copyright (c) 2014-2023, SkyVerge, Inc.\n Licensed under the GNU General Public License v3.0\n http://www.gnu.org/licenses/gpl-3.0.html\n###\njQuery ( $ ) ->\n\t\"use strict\"\n\n\n\tclass window.SV_WC_Payment_Form_Handler_v5_11_11\n\n\n\t\t# Public: Instantiate Payment Form Handler\n\t\t#\n\t\t# args - object with properties:\n\t\t# id - gateway ID\n\t\t# id_dasherized - gateway ID dasherized\n\t\t# plugin_id - plugin ID\n\t\t# type - gateway type, either `credit-card` or `echeck`\n\t\t# csc_required - true if the gateway requires the CSC field to be displayed\n\t\t#\n\t\t# Returns SV_WC_Payment_Form_Handler_v5_11_11 instance\n\t\tconstructor: (args) ->\n\n\t\t\t@id = args.id\n\t\t\t@id_dasherized = args.id_dasherized\n\t\t\t@plugin_id = args.plugin_id\n\t\t\t@type = args.type\n\t\t\t@csc_required = args.csc_required\n\t\t\t@csc_required_for_tokens = args.csc_required_for_tokens\n\t\t\t@enabled_card_types = args.enabled_card_types\n\n\t\t\t# which payment form?\n\t\t\tif $( 'form.checkout' ).length\n\t\t\t\t@form = $( 'form.checkout' )\n\t\t\t\tthis.handle_checkout_page()\n\n\t\t\telse if $( 'form#order_review' ).length\n\t\t\t\t@form = $( 'form#order_review' )\n\t\t\t\tthis.handle_pay_page()\n\n\t\t\telse if $( 'form#add_payment_method' ).length\n\t\t\t\t@form = $( 'form#add_payment_method' )\n\t\t\t\tthis.handle_add_payment_method_page()\n\n\t\t\telse\n\t\t\t\tconsole.log( 'No payment form found!' )\n\t\t\t\treturn\n\n\t\t\t# localized error messages\n\t\t\t@params = window[ \"sv_wc_payment_gateway_payment_form_params\" ]\n\n\t\t\t# handle sample check image hint\n\t\t\t@form.on( 'click', '.js-sv-wc-payment-gateway-echeck-form-check-hint, .js-sv-wc-payment-gateway-echeck-form-sample-check', => this.handle_sample_check_hint() ) if @type is 'echeck'\n\n\t\t\t$( document ).trigger( 'sv_wc_payment_form_handler_init', { id: @id, instance: @ } )\n\n\n\t\t# Public: Handle required actions on the checkout page\n\t\t#\n\t\t# Returns nothing.\n\t\thandle_checkout_page: ->\n\n\t\t\t# format/validate credit card inputs using jQuery.payment\n\t\t\t$( document.body ).on( 'updated_checkout', => this.format_credit_card_inputs() ) if @type is 'credit-card'\n\n\t\t\t# updated payment fields jQuery object on each checkout update (prevents stale data)\n\t\t\t$( document.body ).on( 'updated_checkout', => this.set_payment_fields() )\n\n\t\t\t# handle saved payment methods\n\t\t\t# note on the checkout page, this is bound to `updated_checkout` so it\n\t\t\t# fires even when other parts of the checkout are changed\n\t\t\t$( document.body ).on( 'updated_checkout', => this.handle_saved_payment_methods() )\n\n\t\t\t# validate payment data before order is submitted\n\t\t\t@form.on( \"checkout_place_order_#{ @id }\", => this.validate_payment_data() )\n\n\n\t\t# Public: Handle required actions on the Order > Pay page\n\t\t#\n\t\t# Returns nothing.\n\t\thandle_pay_page: ->\n\n\t\t\tthis.set_payment_fields()\n\n\t\t\t# format/validate credit card inputs using jQuery.payment\n\t\t\tif @type is 'credit-card'\n\t\t\t\tthis.format_credit_card_inputs()\n\n\t\t\t# handle saved payment methods\n\t\t\tthis.handle_saved_payment_methods()\n\n\t\t\t# validate payment data before order is submitted\n\t\t\t@form.submit =>\n\n\t\t\t\t# but only when one of our payment gateways is selected\n\t\t\t\treturn this.validate_payment_data() if $( '#order_review input[name=payment_method]:checked' ).val() is @id\n\n\n\t\t# Public: Handle required actions on the Add Payment Method page\n\t\t#\n\t\t# Returns nothing.\n\t\thandle_add_payment_method_page: ->\n\n\t\t\tthis.set_payment_fields()\n\n\t\t\t# format/validate credit card inputs using jQuery.payment\n\t\t\tif @type is 'credit-card'\n\t\t\t\tthis.format_credit_card_inputs()\n\n\t\t\t# validate payment data before order is submitted\n\t\t\t@form.submit =>\n\n\t\t\t\t# but only when one of our payment gateways is selected\n\t\t\t\treturn this.validate_payment_data() if $( '#add_payment_method input[name=payment_method]:checked' ).val() is @id\n\n\n\t\t# Public: Set payment fields class variable, this is done\n\t\t# during the updated_checkout event as otherwise the reference to\n\t\t# the checkout fields becomes stale (somehow ¯\\_(ツ)_/¯)\n\t\t#\n\t\t# This ensures payment fields are not marked as \"invalid\" before the customer has interacted with them.\n\t\t#\n\t\t# Returns nothing.\n\t\tset_payment_fields: ->\n\n\t\t\t@payment_fields = $( \".payment_method_#{ @id }\" )\n\n\t\t\t$required_fields = @payment_fields.find( '.validate-required .input-text' )\n\n\t\t\t$required_fields.each( ( i, input ) =>\n\n\t\t\t\t# if any of the required fields have a value, bail this loop and proceed with WooCommerce validation\n\t\t\t\tif $( input ).val()\n\t\t\t\t\treturn false\n\n\t\t\t\t# otherwise remove all validation result classes from the inputs, since the form is freshly loaded\n\t\t\t\t$( input ).trigger( 'input' )\n\t\t\t)\n\n\n\t\t# Public: Validate Payment data when order is placed\n\t\t#\n\t\t# Returns boolean, true if payment data is valid, false otherwise\n\t\tvalidate_payment_data: ->\n\n\t\t\t# bail when already processing\n\t\t\treturn false if @form.is( '.processing' )\n\n\t\t\t@saved_payment_method_selected = @payment_fields.find( '.js-sv-wc-payment-gateway-payment-token:checked' ).val()\n\n\t\t\t# perform internal validations (all fields present & valid, etc)\n\t\t\tvalid = if @type is 'credit-card' then this.validate_card_data() else this.validate_account_data()\n\n\t\t\t# let gateways perform their own validation prior to form submission\n\t\t\thandler = $( document.body ).triggerHandler( 'sv_wc_payment_form_valid_payment_data', { payment_form: this, passed_validation: valid } ) isnt false\n\n\t\t\treturn valid && handler\n\n\n\t\t# Public: format card data using jQuery.Payment\n\t\t#\n\t\t# Returns nothing.\n\t\tformat_credit_card_inputs: ->\n\t\t\t$card_number = $('.js-sv-wc-payment-gateway-credit-card-form-account-number').payment('formatCardNumber');\n\t\t\t$expiry = $('.js-sv-wc-payment-gateway-credit-card-form-expiry').payment('formatCardExpiry');\n\t\t\t$csc = $('.js-sv-wc-payment-gateway-credit-card-form-csc').payment('formatCardCVC');\n\n\t\t\t# trigger a 'change' event for non empty fields only\n\t\t\t$card_number.trigger( 'change') if $card_number.val() && $card_number.val().length > 0\n\t\t\t$expiry.trigger( 'change') if $expiry.val() && $expiry.val().length > 0\n\t\t\t$csc.trigger( 'change') if $csc.val() && $csc.val().length > 0\n\n\t\t\t# perform inline validation on credit card inputs\n\t\t\t$( '.js-sv-wc-payment-gateway-credit-card-form-input' ).on( 'change paste keyup', => this.do_inline_credit_card_validation() )\n\n\n\t\t# Public: perform inline validation on credit card fields\n\t\t#\n\t\t# Returns nothing.\n\t\tdo_inline_credit_card_validation: ->\n\n\t\t\t$card_number = $( '.js-sv-wc-payment-gateway-credit-card-form-account-number' )\n\t\t\t$expiry = $( '.js-sv-wc-payment-gateway-credit-card-form-expiry' )\n\t\t\t$csc = $( '.js-sv-wc-payment-gateway-credit-card-form-csc' )\n\n\t\t\t$card_type = $.payment.cardType( $card_number.val() )\n\n\t\t\tif $card_type not in @enabled_card_types\n\t\t\t\t$card_number.addClass( 'invalid-card-type' )\n\t\t\telse\n\t\t\t\t$card_number.removeClass( 'invalid-card-type' )\n\n\t\t\tif $.payment.validateCardExpiry( $expiry.payment( 'cardExpiryVal' ) )\n\t\t\t\t$expiry.addClass( 'identified' )\n\t\t\telse\n\t\t\t\t$expiry.removeClass( 'identified' )\n\n\t\t\tif $.payment.validateCardCVC( $csc.val() )\n\t\t\t\t$csc.addClass( 'identified' )\n\t\t\telse\n\t\t\t\t$csc.removeClass( 'identified' )\n\n\n\t\t# Public: Perform validation on the credit card info entered\n\t\t#\n\t\t# Return boolean, true if credit card info is valid, false otherwise\n\t\tvalidate_card_data: ->\n\n\t\t\terrors = []\n\n\t\t\tcsc = @payment_fields.find( '.js-sv-wc-payment-gateway-credit-card-form-csc' ).val()\n\n\t\t\t# always validate the CSC if present\n\t\t\tif csc?\n\n\t\t\t\tif csc\n\t\t\t\t\terrors.push( @params.cvv_digits_invalid ) if /\\D/.test( csc )\n\t\t\t\t\terrors.push( @params.cvv_length_invalid ) if csc.length < 3 || csc.length > 4\n\t\t\t\telse if @csc_required\n\t\t\t\t\tif not @saved_payment_method_selected or @csc_required_for_tokens\n\t\t\t\t\t\terrors.push( @params.cvv_missing )\n\n\t\t\t# Only validate the other CC fields if necessary\n\t\t\tif not @saved_payment_method_selected\n\n\t\t\t\taccount_number = @payment_fields.find( '.js-sv-wc-payment-gateway-credit-card-form-account-number' ).val()\n\t\t\t\texpiry = $.payment.cardExpiryVal( @payment_fields.find( '.js-sv-wc-payment-gateway-credit-card-form-expiry' ).val() )\n\n\t\t\t\t# replace any dashes or spaces in the card number\n\t\t\t\taccount_number = account_number.replace( /-|\\s/g, '' )\n\n\t\t\t\t# validate card number\n\t\t\t\tif not account_number\n\t\t\t\t\terrors.push( @params.card_number_missing )\n\t\t\t\telse\n\t\t\t\t\terrors.push( @params.card_number_length_invalid ) if account_number.length < 12 || account_number.length > 19\n\t\t\t\t\terrors.push( @params.card_number_digits_invalid ) if /\\D/.test( account_number )\n\t\t\t\t\terrors.push( @params.card_number_invalid ) unless $.payment.validateCardNumber( account_number ) # performs luhn check\n\n\t\t\t\t# validate expiration date\n\t\t\t\terrors.push( @params.card_exp_date_invalid ) unless $.payment.validateCardExpiry( expiry ) # validates future date\n\n\t\t\tif errors.length > 0\n\t\t\t\tthis.render_errors( errors )\n\t\t\t\treturn false\n\t\t\telse\n\t\t\t\t# get rid of any space/dash characters\n\t\t\t\t@payment_fields.find( '.js-sv-wc-payment-gateway-credit-card-form-account-number' ).val( account_number )\n\t\t\t\treturn true\n\n\n\t\t# Public: Perform validation on the eCheck info entered\n\t\t#\n\t\t# Return boolean, true if eCheck info is valid, false otherwise\n\t\tvalidate_account_data: ->\n\n\t\t\treturn true if @saved_payment_method_selected\n\n\t\t\terrors = []\n\n\t\t\trouting_number = @payment_fields.find('.js-sv-wc-payment-gateway-echeck-form-routing-number').val()\n\t\t\taccount_number = @payment_fields.find('.js-sv-wc-payment-gateway-echeck-form-account-number').val()\n\n\t\t\t# validate routing number\n\t\t\tif not routing_number\n\t\t\t\terrors.push( @params.routing_number_missing )\n\t\t\telse\n\t\t\t\terrors.push( @params.routing_number_length_invalid ) if 9 != routing_number.length\n\t\t\t\terrors.push( @params.routing_number_digits_invalid ) if /\\D/.test( routing_number )\n\n\t\t\t# validate account number\n\t\t\tif not account_number\n\t\t\t\terrors.push( @params.account_number_missing )\n\t\t\telse\n\t\t\t\terrors.push( @params.account_number_length_invalid ) if account_number.length < 3 || account_number.length > 17\n\t\t\t\terrors.push( @params.account_number_invalid ) if /\\D/.test( account_number )\n\n\t\t\tif errors.length > 0\n\t\t\t\tthis.render_errors( errors )\n\t\t\t\treturn false\n\t\t\telse\n\t\t\t\t# get rid of any space/dash characters\n\t\t\t\t@payment_fields.find( '.js-sv-wc-payment-gateway-echeck-form-account-number' ).val( account_number )\n\t\t\t\treturn true\n\n\n\t\t# Public: Render any new errors and bring them into the viewport\n\t\t#\n\t\t# Returns nothing.\n\t\trender_errors: (errors) ->\n\n\t\t\t# hide and remove any previous errors\n\t\t\t$( '.woocommerce-error, .woocommerce-message' ).remove()\n\n\t\t\t# add errors\n\t\t\t@form.prepend '
    • ' + errors.join( '
    • ' ) + '
    '\n\n\t\t\t# unblock UI\n\t\t\t@form.removeClass( 'processing' ).unblock()\n\t\t\t@form.find( '.input-text, select' ).blur()\n\n\t\t\t# scroll to top\n\t\t\t$( 'html, body' ).animate( { scrollTop: @form.offset().top - 100 }, 1000 )\n\n\n\t\t# Public: Handle associated actions for saved payment methods\n\t\t#\n\t\t# Returns nothing.\n\t\thandle_saved_payment_methods: ->\n\n\t\t\t# make available inside change events\n\t\t\tid_dasherized = @id_dasherized\n\n\t\t\tcsc_required = @csc_required\n\t\t\tcsc_required_for_tokens = @csc_required_for_tokens\n\n\t\t\t$new_payment_method_selection = $( \"div.js-wc-#{ id_dasherized }-new-payment-method-form\" )\n\t\t\t$csc_field = $new_payment_method_selection.find( '.js-sv-wc-payment-gateway-credit-card-form-csc' ).closest( '.form-row' )\n\n\t\t\t# show/hide the saved payment methods when a saved payment method is de-selected/selected\n\t\t\t$( \"input.js-wc-#{ @id_dasherized }-payment-token\" ).change ->\n\n\t\t\t\ttokenized_payment_method_selected = $( \"input.js-wc-#{ id_dasherized }-payment-token:checked\" ).val()\n\n\t\t\t\tif tokenized_payment_method_selected\n\n\t\t\t\t\t# using an existing tokenized payment method, hide the 'new method' fields\n\t\t\t\t\t$new_payment_method_selection.slideUp( 200 )\n\n\t\t\t\t\t# move the CSC field out of the 'new method' fields so it can be used with the tokenized transaction\n\t\t\t\t\tif csc_required_for_tokens\n\t\t\t\t\t\t$csc_field.removeClass( 'form-row-last' ).addClass( 'form-row-first' )\n\t\t\t\t\t\t$new_payment_method_selection.after( $csc_field )\n\n\t\t\t\telse\n\t\t\t\t\t# use new payment method, display the 'new method' fields\n\t\t\t\t\t$new_payment_method_selection.slideDown( 200 )\n\n\t\t\t\t\t# move the CSC field back into its regular spot\n\t\t\t\t\tif csc_required_for_tokens\n\t\t\t\t\t\t$csc_field.removeClass( 'form-row-first' ).addClass( 'form-row-last' )\n\t\t\t\t\t\t$new_payment_method_selection.find( '.js-sv-wc-payment-gateway-credit-card-form-expiry' ).closest( '.form-row' ).after( $csc_field )\n\t\t\t.change()\n\n\t\t\t# display the 'save payment method' option for guest checkouts if the 'create account' option is checked\n\t\t\t# but only hide the input if there is a 'create account' checkbox (some themes just display the password)\n\t\t\t$( 'input#createaccount' ).change ->\n\t\t\t\t$parent_row = $( \"input.js-wc-#{ id_dasherized }-tokenize-payment-method\" ).closest( 'p.form-row' )\n\n\t\t\t\tif $( this ).is( ':checked' )\n\t\t\t\t\t$parent_row.slideDown()\n\t\t\t\t\t$parent_row.next().show()\n\t\t\t\telse\n\t\t\t\t\t$parent_row.hide()\n\t\t\t\t\t$parent_row.next().hide()\n\n\t\t\t$( 'input#createaccount' ).change() unless $( 'input#createaccount' ).is( ':checked' )\n\n\n\t\t# Public: Handle showing/hiding the sample check image\n\t\t#\n\t\t# Returns nothing.\n\t\thandle_sample_check_hint: ->\n\n\t\t\t$sample_check = @payment_fields.find( '.js-sv-wc-payment-gateway-echeck-form-sample-check' )\n\n\t\t\tif $sample_check.is( \":visible\" ) then $sample_check.slideUp() else $sample_check.slideDown()\n\n\n\n\t\t# Blocks the payment form UI\n\t\t#\n\t\t# @since 3.0.0\n\t\tblock_ui: -> @form.block( message: null, overlayCSS: background: '#fff',opacity: 0.6 )\n\n\n\t\t# Unblocks the payment form UI\n\t\t#\n\t\t# @since 3.0.0\n\t\tunblock_ui: -> @form.unblock()\n\n\n\t# dispatch loaded event\n\t$( document.body ).trigger( \"sv_wc_payment_form_handler_v5_11_11_loaded\" )\n"]} diff --git a/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-apple-pay.coffee b/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-apple-pay.coffee index 62f4eeacd..51a5497f8 100644 --- a/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-apple-pay.coffee +++ b/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-apple-pay.coffee @@ -14,7 +14,7 @@ jQuery ( $ ) -> # The WooCommerce Apple Pay handler base class. # # @since 4.7.0 - class window.SV_WC_Apple_Pay_Handler_v5_11_10 + class window.SV_WC_Apple_Pay_Handler_v5_11_11 # Constructs the handler. @@ -440,4 +440,4 @@ jQuery ( $ ) -> # dispatch loaded event - $( document.body ).trigger( 'sv_wc_apple_pay_handler_v5_11_10_loaded' ) + $( document.body ).trigger( 'sv_wc_apple_pay_handler_v5_11_11_loaded' ) diff --git a/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-google-pay.js b/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-google-pay.js index bc5124859..9dd0351a3 100644 --- a/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-google-pay.js +++ b/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-google-pay.js @@ -7,9 +7,9 @@ jQuery( function( $ ) { * * @since 5.10.0 * - * @type {SV_WC_Google_Pay_Handler_v5_11_10} object + * @type {SV_WC_Google_Pay_Handler_v5_11_11} object */ - window.SV_WC_Google_Pay_Handler_v5_11_10 = class SV_WC_Google_Pay_Handler_v5_11_10 { + window.SV_WC_Google_Pay_Handler_v5_11_11 = class SV_WC_Google_Pay_Handler_v5_11_11 { /** * Handler constructor. @@ -609,6 +609,6 @@ jQuery( function( $ ) { } } - $( document.body ).trigger( 'sv_wc_google_pay_handler_v5_11_10_loaded' ); + $( document.body ).trigger( 'sv_wc_google_pay_handler_v5_11_11_loaded' ); } ); diff --git a/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-my-payment-methods.coffee b/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-my-payment-methods.coffee index 39023aa3f..47e1dad5a 100644 --- a/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-my-payment-methods.coffee +++ b/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-my-payment-methods.coffee @@ -12,7 +12,7 @@ jQuery ( $ ) -> # The My Payment Methods handler. # # @since 5.1.0 - class window.SV_WC_Payment_Methods_Handler_v5_11_10 + class window.SV_WC_Payment_Methods_Handler_v5_11_11 # Constructs the class. @@ -268,4 +268,4 @@ jQuery ( $ ) -> # dispatch loaded event - $( document.body ).trigger( 'sv_wc_payment_methods_handler_v5_11_10_loaded' ) + $( document.body ).trigger( 'sv_wc_payment_methods_handler_v5_11_11_loaded' ) diff --git a/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-payment-form.coffee b/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-payment-form.coffee index 10ff952c6..67c473ed5 100644 --- a/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-payment-form.coffee +++ b/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-payment-form.coffee @@ -10,7 +10,7 @@ jQuery ( $ ) -> "use strict" - class window.SV_WC_Payment_Form_Handler_v5_11_10 + class window.SV_WC_Payment_Form_Handler_v5_11_11 # Public: Instantiate Payment Form Handler @@ -22,7 +22,7 @@ jQuery ( $ ) -> # type - gateway type, either `credit-card` or `echeck` # csc_required - true if the gateway requires the CSC field to be displayed # - # Returns SV_WC_Payment_Form_Handler_v5_11_10 instance + # Returns SV_WC_Payment_Form_Handler_v5_11_11 instance constructor: (args) -> @id = args.id @@ -385,4 +385,4 @@ jQuery ( $ ) -> # dispatch loaded event - $( document.body ).trigger( "sv_wc_payment_form_handler_v5_11_10_loaded" ) + $( document.body ).trigger( "sv_wc_payment_form_handler_v5_11_11_loaded" ) diff --git a/woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php b/woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php index 40cd47ddc..3f0485a54 100644 --- a/woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php +++ b/woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Direct' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Direct' ) ) : /** diff --git a/woocommerce/payment-gateway/class-sv-wc-payment-gateway-helper.php b/woocommerce/payment-gateway/class-sv-wc-payment-gateway-helper.php index fc353f2e1..96a8a85c0 100755 --- a/woocommerce/payment-gateway/class-sv-wc-payment-gateway-helper.php +++ b/woocommerce/payment-gateway/class-sv-wc-payment-gateway-helper.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Helper' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Helper' ) ) : /** diff --git a/woocommerce/payment-gateway/class-sv-wc-payment-gateway-hosted.php b/woocommerce/payment-gateway/class-sv-wc-payment-gateway-hosted.php index 6f5c285d6..fdf61a4a6 100644 --- a/woocommerce/payment-gateway/class-sv-wc-payment-gateway-hosted.php +++ b/woocommerce/payment-gateway/class-sv-wc-payment-gateway-hosted.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Hosted' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Hosted' ) ) : /** diff --git a/woocommerce/payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php b/woocommerce/payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php index 933877815..3a00d99b1 100644 --- a/woocommerce/payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php +++ b/woocommerce/payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_My_Payment_Methods' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_My_Payment_Methods' ) ) : /** @@ -169,9 +169,9 @@ public function maybe_enqueue_styles_scripts() { wp_register_script( 'jquery-tiptip', WC()->plugin_url() . '/assets/js/jquery-tiptip/jquery.tipTip.min.js', array( 'jquery' ), WC_VERSION, true ); - wp_enqueue_style( "$handle-v5_11_10", $this->get_plugin()->get_payment_gateway_framework_assets_url() . '/css/frontend/' . $handle . '.min.css', array( 'dashicons' ), SV_WC_Plugin::VERSION ); + wp_enqueue_style( "$handle-v5_11_11", $this->get_plugin()->get_payment_gateway_framework_assets_url() . '/css/frontend/' . $handle . '.min.css', array( 'dashicons' ), SV_WC_Plugin::VERSION ); - wp_enqueue_script( "$handle-v5_11_10", $this->get_plugin()->get_payment_gateway_framework_assets_url() . '/dist/frontend/' . $handle . '.js', array( 'jquery-tiptip', 'jquery' ), SV_WC_Plugin::VERSION ); + wp_enqueue_script( "$handle-v5_11_11", $this->get_plugin()->get_payment_gateway_framework_assets_url() . '/dist/frontend/' . $handle . '.js', array( 'jquery-tiptip', 'jquery' ), SV_WC_Plugin::VERSION ); } diff --git a/woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php b/woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php index e5e724973..fd2d60d63 100644 --- a/woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php +++ b/woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Payment_Form' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Payment_Form' ) ) : /** @@ -1103,7 +1103,7 @@ protected function get_js_handler_args() { if ( is_array( $card_types ) && ! empty( $card_types ) ) { - $args['enabled_card_types'] = array_map( [ 'SkyVerge\WooCommerce\PluginFramework\v5_11_10\SV_WC_Payment_Gateway_Helper', 'normalize_card_type' ], $card_types ); + $args['enabled_card_types'] = array_map( [ 'SkyVerge\WooCommerce\PluginFramework\v5_11_11\SV_WC_Payment_Gateway_Helper', 'normalize_card_type' ], $card_types ); } } diff --git a/woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php b/woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php index b3eae86ee..e55d18864 100644 --- a/woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php +++ b/woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php @@ -22,16 +22,16 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; use Automattic\WooCommerce\Admin\Notes\WC_Admin_Note; use Automattic\WooCommerce\Admin\Notes\WC_Admin_Notes; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\Payment_Gateway\External_Checkout\External_Checkout; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\Payment_Gateway\External_Checkout\Google_Pay\Google_Pay; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\Payment_Gateway\External_Checkout\External_Checkout; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\Payment_Gateway\External_Checkout\Google_Pay\Google_Pay; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Plugin' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Plugin' ) ) : /** diff --git a/woocommerce/payment-gateway/class-sv-wc-payment-gateway-privacy.php b/woocommerce/payment-gateway/class-sv-wc-payment-gateway-privacy.php index aded171d2..c90347471 100644 --- a/woocommerce/payment-gateway/class-sv-wc-payment-gateway-privacy.php +++ b/woocommerce/payment-gateway/class-sv-wc-payment-gateway-privacy.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Privacy' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Privacy' ) ) : /** diff --git a/woocommerce/payment-gateway/class-sv-wc-payment-gateway.php b/woocommerce/payment-gateway/class-sv-wc-payment-gateway.php index 95c718711..1ae37cadd 100755 --- a/woocommerce/payment-gateway/class-sv-wc-payment-gateway.php +++ b/woocommerce/payment-gateway/class-sv-wc-payment-gateway.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway' ) ) : /** @@ -460,7 +460,7 @@ protected function enqueue_payment_form_assets() { } $handle = 'sv-wc-payment-gateway-payment-form'; - $versioned_handle = $handle . '-v5_11_10'; + $versioned_handle = $handle . '-v5_11_11'; // Frontend JS wp_enqueue_script( $versioned_handle, $this->get_plugin()->get_payment_gateway_framework_assets_url() . '/dist/frontend/' . $handle . '.js', array( 'jquery-payment' ), SV_WC_Plugin::VERSION, true ); diff --git a/woocommerce/payment-gateway/exceptions/class-sv-wc-payment-gateway-exception.php b/woocommerce/payment-gateway/exceptions/class-sv-wc-payment-gateway-exception.php index 5c3a0ed05..c901089a3 100644 --- a/woocommerce/payment-gateway/exceptions/class-sv-wc-payment-gateway-exception.php +++ b/woocommerce/payment-gateway/exceptions/class-sv-wc-payment-gateway-exception.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Exception' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Exception' ) ) : /** diff --git a/woocommerce/payment-gateway/integrations/abstract-sv-wc-payment-gateway-integration.php b/woocommerce/payment-gateway/integrations/abstract-sv-wc-payment-gateway-integration.php index 40a975de4..31f9625ff 100644 --- a/woocommerce/payment-gateway/integrations/abstract-sv-wc-payment-gateway-integration.php +++ b/woocommerce/payment-gateway/integrations/abstract-sv-wc-payment-gateway-integration.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Integration' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Integration' ) ) : /** diff --git a/woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php b/woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php index 0706fdf93..8b576bb12 100644 --- a/woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php +++ b/woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Integration_Pre_Orders' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Integration_Pre_Orders' ) ) : /** diff --git a/woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php b/woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php index d3674f2d6..9a2f58247 100644 --- a/woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php +++ b/woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Integration_Subscriptions' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Integration_Subscriptions' ) ) : /** @@ -98,7 +98,11 @@ public function add_support() { add_filter( 'woocommerce_my_subscriptions_payment_method', array( $this, 'maybe_render_payment_method' ), 10, 3 ); // don't copy over order-specific meta to the WC_Subscription object during renewal processing - add_filter( 'wcs_renewal_order_meta', array( $this, 'do_not_copy_order_meta' ) ); + if ( SV_WC_Plugin_Compatibility::is_wc_subscriptions_version_gte( '2.5' ) ) { + add_filter( 'wc_subscriptions_renewal_order_data', [ $this, 'do_not_copy_order_meta' ] ); + } else { + add_filter( 'wcs_renewal_order_meta', [ $this, 'do_not_copy_order_meta' ] ); + } // process the Change Payment "transaction" add_filter( 'wc_payment_gateway_' . $this->get_gateway()->get_id() . '_process_payment', array( $this, 'process_change_payment' ), 10, 3 ); @@ -425,23 +429,25 @@ public function get_order( $order ) { /** - * Don't copy order-specific meta to renewal orders from the WC_Subscription - * object. Generally the subscription object should not have any order-specific - * meta (aside from `payment_token` and `customer_id`) as they are not - * copied during the upgrade (see do_not_copy_order_meta_during_upgrade()), so - * this method is more of a fallback in case meta accidentally is copied. + * Don't copy order-specific meta to renewal orders from the {@see WC_Subscription} object. + * + * Generally the subscription object should not have any order-specific meta (aside from `payment_token` and `customer_id`) + * as they are not copied during the upgrade (see do_not_copy_order_meta_during_upgrade()), + * so this method is more of a fallback in case meta accidentally is copied. * * @since 4.1.0 - * @param array $order_meta order meta to copy - * @return array + * + * @param array|scalar $order_meta order meta to copy + * @return array|scalar */ public function do_not_copy_order_meta( $order_meta ) { $meta_keys = $this->get_order_specific_meta_keys(); - foreach ( $order_meta as $index => $meta ) { + foreach ( (array) $order_meta as $index => $meta ) { - if ( in_array( $meta['meta_key'], $meta_keys ) ) { + // this accounts for different versions of the Subscriptions filter running before and after WooCommerce Subscriptions 2.5 + if ( in_array( $index, $meta_keys ) || ( isset( $meta['meta_key'] ) && in_array( $meta['meta_key'], $meta_keys ) ) ) { unset( $order_meta[ $index ] ); } } diff --git a/woocommerce/payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-token.php b/woocommerce/payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-token.php index d5f87dd61..8a494c557 100644 --- a/woocommerce/payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-token.php +++ b/woocommerce/payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-token.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Payment_Token' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Payment_Token' ) ) : /** diff --git a/woocommerce/payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php b/woocommerce/payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php index 8044368fb..ec05c0e6b 100644 --- a/woocommerce/payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php +++ b/woocommerce/payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WC_Payment_Gateway_Payment_Tokens_Handler' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WC_Payment_Gateway_Payment_Tokens_Handler' ) ) : /** diff --git a/woocommerce/payment-gateway/rest-api/class-sv-wc-payment-gateway-plugin-rest-api.php b/woocommerce/payment-gateway/rest-api/class-sv-wc-payment-gateway-plugin-rest-api.php index 7f0105696..b00e53574 100644 --- a/woocommerce/payment-gateway/rest-api/class-sv-wc-payment-gateway-plugin-rest-api.php +++ b/woocommerce/payment-gateway/rest-api/class-sv-wc-payment-gateway-plugin-rest-api.php @@ -22,19 +22,19 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10\Payment_Gateway; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11\Payment_Gateway; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\REST_API as Plugin_REST_API; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\REST_API as Plugin_REST_API; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\Payment_Gateway\\REST_API' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\Payment_Gateway\\REST_API' ) ) : /** * The payment gateway plugin REST API handler class. * - * @see \SkyVerge\WooCommerce\PluginFramework\v5_11_10\REST_API + * @see \SkyVerge\WooCommerce\PluginFramework\v5_11_11\REST_API * * @since 5.2.0 */ @@ -46,7 +46,7 @@ class REST_API extends Plugin_REST_API { * * Plugins can override this to add their own data. * - * @see \SkyVerge\WooCommerce\PluginFramework\v5_11_10\REST_API::get_system_status_data() + * @see \SkyVerge\WooCommerce\PluginFramework\v5_11_11\REST_API::get_system_status_data() * * @since 5.2.0 * diff --git a/woocommerce/rest-api/Controllers/Settings.php b/woocommerce/rest-api/Controllers/Settings.php index 1bd306043..b43d318e2 100644 --- a/woocommerce/rest-api/Controllers/Settings.php +++ b/woocommerce/rest-api/Controllers/Settings.php @@ -22,14 +22,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10\REST_API\Controllers; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11\REST_API\Controllers; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\Settings_API\Abstract_Settings; -use SkyVerge\WooCommerce\PluginFramework\v5_11_10\Settings_API\Setting; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\Settings_API\Abstract_Settings; +use SkyVerge\WooCommerce\PluginFramework\v5_11_11\Settings_API\Setting; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\REST_API\\Controllers\\Settings' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\REST_API\\Controllers\\Settings' ) ) : /** diff --git a/woocommerce/rest-api/class-sv-wc-plugin-rest-api.php b/woocommerce/rest-api/class-sv-wc-plugin-rest-api.php index f80b41476..2765f6cba 100644 --- a/woocommerce/rest-api/class-sv-wc-plugin-rest-api.php +++ b/woocommerce/rest-api/class-sv-wc-plugin-rest-api.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\REST_API' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\REST_API' ) ) : /** diff --git a/woocommerce/utilities/class-sv-wp-async-request.php b/woocommerce/utilities/class-sv-wp-async-request.php index fa69c9f6c..e5810a9e5 100644 --- a/woocommerce/utilities/class-sv-wp-async-request.php +++ b/woocommerce/utilities/class-sv-wp-async-request.php @@ -23,11 +23,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WP_Async_Request' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WP_Async_Request' ) ) : /** diff --git a/woocommerce/utilities/class-sv-wp-background-job-handler.php b/woocommerce/utilities/class-sv-wp-background-job-handler.php index 782ec560d..7d5f15ee2 100644 --- a/woocommerce/utilities/class-sv-wp-background-job-handler.php +++ b/woocommerce/utilities/class-sv-wp-background-job-handler.php @@ -23,11 +23,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; +namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WP_Background_Job_Handler' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WP_Background_Job_Handler' ) ) : /** diff --git a/woocommerce/utilities/class-sv-wp-job-batch-handler.php b/woocommerce/utilities/class-sv-wp-job-batch-handler.php index b98f65bd3..1f444fb23 100644 --- a/woocommerce/utilities/class-sv-wp-job-batch-handler.php +++ b/woocommerce/utilities/class-sv-wp-job-batch-handler.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ - namespace SkyVerge\WooCommerce\PluginFramework\v5_11_10; + namespace SkyVerge\WooCommerce\PluginFramework\v5_11_11; defined( 'ABSPATH' ) or exit; - if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_10\\SV_WP_Job_Batch_Handler' ) ) : + if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_11_11\\SV_WP_Job_Batch_Handler' ) ) : /**