diff --git a/composer.json b/composer.json index 9e14d0a36..f14312acb 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.15.6", + "version": "5.15.7", "license": "GPL-3.0", "minimum-stability": "dev", "prefer-stable": true, @@ -35,12 +35,12 @@ "woocommerce/class-sv-wp-admin-message-handler.php" ], "psr-4": { - "SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\": "woocommerce/" + "SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\": "woocommerce/" } }, "autoload-dev": { "psr-4": { - "SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\Tests\\": "tests/" + "SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\Tests\\": "tests/" } }, "config": { diff --git a/package-lock.json b/package-lock.json index 6ffe0e0ad..dac309d11 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "wc-plugin-framework", - "version": "5.15.6", + "version": "5.15.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "wc-plugin-framework", - "version": "5.15.6", + "version": "5.15.7", "license": "GPL-3.0", "devDependencies": { "@parcel/transformer-coffeescript": "^2.13.3", diff --git a/package.json b/package.json index 261ccc874..0340657ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wc-plugin-framework", - "version": "5.15.6", + "version": "5.15.7", "title": "WooCommerce Plugin Framework", "author": "SkyVerge Team", "homepage": "https://github.com/skyverge/wc-plugin-framework#readme", diff --git a/tests/TestCase.php b/tests/TestCase.php index e81f7e0b3..d7c13154c 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -1,6 +1,6 @@ assertInstanceOf( '\SkyVerge\WooCommerce\PluginFramework\v5_15_6\SV_WC_Plugin_Dependencies', $this->get_plugin()->get_dependency_handler() ); + $this->assertInstanceOf( '\SkyVerge\WooCommerce\PluginFramework\v5_15_7\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_15_6\Plugin\Lifecycle', $this->get_plugin()->get_lifecycle_handler() ); + $this->assertInstanceOf( '\SkyVerge\WooCommerce\PluginFramework\v5_15_7\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 de6de865a..2493be325 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_15_6_loaded\', load_gateway_test_plugin_payment_methods_handler );', $wc_queued_js ); + $this->assertStringContainsString( 'window.jQuery( document.body ).on( \'sv_wc_payment_methods_handler_v5_15_7_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 116a70c70..88656debf 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_15_6_loaded\', load_test_gateway_payment_form_handler );', $wc_queued_js ); + $this->assertStringContainsString( 'window.jQuery( document.body ).on( \'sv_wc_payment_form_handler_v5_15_7_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 d867fb984..543b922ef 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_15_6_loaded\', load_test_gateway_apple_pay_handler );', $wc_queued_js ); + $this->assertStringContainsString( 'window.jQuery( document.body ).on( \'sv_wc_apple_pay_handler_v5_15_7_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 113289abd..0736777a7 100644 --- a/tests/unit/API/CacheableRequestTraitTest.php +++ b/tests/unit/API/CacheableRequestTraitTest.php @@ -1,9 +1,9 @@ \SkyVerge\WooCommerce\PluginFramework\v5_15_6\Country_Helper::class, - PaymentFormContextChecker::class => \SkyVerge\WooCommerce\PluginFramework\v5_15_6\PaymentFormContextChecker::class, + Country_Helper::class => \SkyVerge\WooCommerce\PluginFramework\v5_15_7\Country_Helper::class, + PaymentFormContextChecker::class => \SkyVerge\WooCommerce\PluginFramework\v5_15_7\PaymentFormContextChecker::class, ]; foreach ($aliases as $alias) { diff --git a/tests/unit/HelperTest.php b/tests/unit/HelperTest.php index 2c9a9b7dc..1dc505be7 100644 --- a/tests/unit/HelperTest.php +++ b/tests/unit/HelperTest.php @@ -1,20 +1,20 @@ js_handler_base_class_name ); + return sprintf( '%s_v5_15_7', $this->js_handler_base_class_name ); } diff --git a/woocommerce/Helpers/ArrayHelper.php b/woocommerce/Helpers/ArrayHelper.php index e73606354..257bc42bd 100644 --- a/woocommerce/Helpers/ArrayHelper.php +++ b/woocommerce/Helpers/ArrayHelper.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_15_6\Helpers; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7\Helpers; use ArrayAccess; diff --git a/woocommerce/Helpers/NumberHelper.php b/woocommerce/Helpers/NumberHelper.php index 69f6b2bb5..93a9f7242 100644 --- a/woocommerce/Helpers/NumberHelper.php +++ b/woocommerce/Helpers/NumberHelper.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_15_6\Helpers; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7\Helpers; class NumberHelper { diff --git a/woocommerce/Helpers/PageHelper.php b/woocommerce/Helpers/PageHelper.php index e67e54872..9c24cfae2 100644 --- a/woocommerce/Helpers/PageHelper.php +++ b/woocommerce/Helpers/PageHelper.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_15_6\Helpers; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7\Helpers; class PageHelper { diff --git a/woocommerce/Plugin/Lifecycle.php b/woocommerce/Plugin/Lifecycle.php index 6eba679b9..bfbce4913 100644 --- a/woocommerce/Plugin/Lifecycle.php +++ b/woocommerce/Plugin/Lifecycle.php @@ -22,12 +22,12 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_15_6\Plugin; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7\Plugin; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\Admin\Notes_Helper; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\SV_WC_Payment_Gateway_Plugin; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\SV_WC_Plugin; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\SV_WC_Plugin_Compatibility; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\Admin\Notes_Helper; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\SV_WC_Payment_Gateway_Plugin; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\SV_WC_Plugin; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\SV_WC_Plugin_Compatibility; defined( 'ABSPATH' ) or exit; diff --git a/woocommerce/Settings_API/Abstract_Settings.php b/woocommerce/Settings_API/Abstract_Settings.php index 4c2965318..f80b20dbf 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_15_6\Settings_API; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7\Settings_API; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6 as Framework; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7 as Framework; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\Settings_API\\Abstract_Settings' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\Settings_API\\Abstract_Settings' ) ) : /** diff --git a/woocommerce/Settings_API/Control.php b/woocommerce/Settings_API/Control.php index 5d3a0fbac..9629f0266 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_15_6\Settings_API; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7\Settings_API; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6 as Framework; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7 as Framework; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\Settings_API\\Control' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\Settings_API\\Control' ) ) : /** diff --git a/woocommerce/Settings_API/Setting.php b/woocommerce/Settings_API/Setting.php index f0557ce69..e84f0fdbb 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_15_6\Settings_API; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7\Settings_API; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6 as Framework; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7 as Framework; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\Settings_API\\Setting' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\Settings_API\\Setting' ) ) : /** diff --git a/woocommerce/Traits/CanConvertToArrayTrait.php b/woocommerce/Traits/CanConvertToArrayTrait.php index 425afefed..26f1e79d8 100644 --- a/woocommerce/Traits/CanConvertToArrayTrait.php +++ b/woocommerce/Traits/CanConvertToArrayTrait.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_15_6\Traits; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7\Traits; use ReflectionClass; use ReflectionProperty; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\Helpers\ArrayHelper; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\Helpers\ArrayHelper; /** * A trait that allows a given class/object to convert its state to an array. diff --git a/woocommerce/Traits/CanGetNewInstanceTrait.php b/woocommerce/Traits/CanGetNewInstanceTrait.php index 2c814dc19..46a6b5246 100644 --- a/woocommerce/Traits/CanGetNewInstanceTrait.php +++ b/woocommerce/Traits/CanGetNewInstanceTrait.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_15_6\Traits; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7\Traits; defined('ABSPATH') or exit; -if (trait_exists('\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\Traits\\CanGetNewInstanceTrait')) { +if (trait_exists('\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\Traits\\CanGetNewInstanceTrait')) { return; } diff --git a/woocommerce/Traits/IsSingletonTrait.php b/woocommerce/Traits/IsSingletonTrait.php index 3a5efed89..fd44e6161 100644 --- a/woocommerce/Traits/IsSingletonTrait.php +++ b/woocommerce/Traits/IsSingletonTrait.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_15_6\Traits; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7\Traits; defined('ABSPATH') or exit; -if (trait_exists('\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\Traits\\IsSingletonTrait')) { +if (trait_exists('\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\Traits\\IsSingletonTrait')) { return; } diff --git a/woocommerce/admin/Notes_Helper.php b/woocommerce/admin/Notes_Helper.php index 1bdefdcf8..58ecd1013 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_15_6\Admin; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7\Admin; use Automattic\WooCommerce\Admin\Notes as WooCommerce_Admin_Notes; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\Admin\\Notes_Helper' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 cf65b9642..bb8963d12 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_15_6\Admin; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7\Admin; defined( 'ABSPATH' ) or exit; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6 as Framework; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7 as Framework; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\Admin\\Setup_Wizard' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\Admin\\Setup_Wizard' ) ) : /** diff --git a/woocommerce/api/Abstract_Cacheable_API_Base.php b/woocommerce/api/Abstract_Cacheable_API_Base.php index 05d6c1c59..5f18db08b 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_15_6\API; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7\API; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\SV_WC_API_Base; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\API\Traits\Cacheable_Request_Trait; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\SV_WC_API_Base; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\API\Traits\Cacheable_Request_Trait; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\API\\Abstract_Cacheable_API_Base' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\API\\Abstract_Cacheable_API_Base' ) ) : /** diff --git a/woocommerce/api/Traits/Cacheable_Request_Trait.php b/woocommerce/api/Traits/Cacheable_Request_Trait.php index 3eef481b6..695d194a8 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_15_6\API\Traits; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7\API\Traits; defined( 'ABSPATH' ) or exit; -if ( ! trait_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\API\\Traits\\Cacheable_Request_Trait' ) ) : +if ( ! trait_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\API\\Traits\\Cacheable_Request_Trait' ) ) : /** diff --git a/woocommerce/api/abstract-sv-wc-api-json-request.php b/woocommerce/api/abstract-sv-wc-api-json-request.php index b65612a0c..fd6036b13 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_API_JSON_Request' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 f99d5a634..cdf9e968e 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_API_JSON_Response' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 041127f5c..80708e91b 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_API_XML_Request' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 5a9a0be4a..62e9f15fa 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_API_XML_Response' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 9249932d5..3a7a0d595 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_API_Base' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 bc58d17c6..ba49360b2 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_API_Exception' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 3fb6a3163..04338f2fe 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_API_Request' ) ) : +if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 5ad990737..4637e9283 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_API_Response' ) ) : +if ( ! interface_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\SV_WC_API_Response' ) ) : /** diff --git a/woocommerce/changelog.txt b/woocommerce/changelog.txt index b6d9a244d..ee06b9d43 100644 --- a/woocommerce/changelog.txt +++ b/woocommerce/changelog.txt @@ -1,5 +1,8 @@ *** SkyVerge WooCommerce Plugin Framework Changelog *** +2025.04.29 - version 5.15.7 +* Fix: Avoid triggering notices for loading translations too early + 2025.03.11 - version 5.15.6 * New: Added additional helper methods to the trait `HasEmailPreviewValuesTrait` diff --git a/woocommerce/class-sv-wc-admin-notice-handler.php b/woocommerce/class-sv-wc-admin-notice-handler.php index 6235995c4..6e79bedad 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Admin_Notice_Handler' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\SV_WC_Admin_Notice_Handler' ) ) : /** diff --git a/woocommerce/class-sv-wc-helper.php b/woocommerce/class-sv-wc-helper.php index 923ab30e1..173c48ed3 100644 --- a/woocommerce/class-sv-wc-helper.php +++ b/woocommerce/class-sv-wc-helper.php @@ -22,15 +22,15 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\Helpers\NumberHelper; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\Helpers\NumberHelper; use WC_Data; use WP_Post; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Helper' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\SV_WC_Helper' ) ) : /** diff --git a/woocommerce/class-sv-wc-hook-deprecator.php b/woocommerce/class-sv-wc-hook-deprecator.php index 52b199995..dbbeb2723 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Hook_Deprecator' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\SV_WC_Hook_Deprecator' ) ) : /** @@ -38,9 +38,9 @@ */ #[\AllowDynamicProperties] class SV_WC_Hook_Deprecator { + protected SV_WC_Plugin $plugin; - - /** @var string plugin name */ + /** @var string plugin name (deprecated) */ protected $plugin_name; /** @var array deprecated/removed hooks */ @@ -50,17 +50,27 @@ class SV_WC_Hook_Deprecator { /** * Setup class * - * @param string $plugin_name + * @param string|SV_WC_Plugin $plugin Plugin instance or string name of plugin (latter is deprecated) * @param array $hooks + * + * @since 5.15.7 The `$plugin_name` parameter has been renamed to `$plugin` and now expects an `SV_WC_Plugin` + * object. This change is to avoid loading translations too early. Support for `$plugin` as + * plugin name remains for back-compat though it will likely result in `_load_textdomain_just_in_time` + * notices being logged for the current extension. */ - public function __construct( $plugin_name, $hooks ) { + public function __construct($plugin, $hooks) + { + if ($plugin instanceof SV_WC_Plugin) { + $this->plugin = $plugin; + } elseif (is_string($plugin)) { + $this->plugin_name = $plugin; + } - $this->plugin_name = $plugin_name; - $this->hooks = array_map( array( $this, 'set_hook_defaults' ), $hooks ); + $this->hooks = array_map([$this, 'set_hook_defaults'], $hooks); $this->map_deprecated_hooks(); - add_action( 'shutdown', array( $this, 'trigger_deprecated_errors' ), 999 ); + add_action('shutdown', [$this, 'trigger_deprecated_errors'], 999); } @@ -180,7 +190,7 @@ protected function trigger_error( $old_hook_name, $hook ) { // e.g. WooCommerce Memberships: "wc_memberships_some_hook" was deprecated in version 1.2.3. $message = sprintf( '%1$s: action/filter "%2$s" was %3$s in version %4$s. ', - $this->plugin_name, + $this->getPluginName(), $old_hook_name, $hook['removed'] ? 'removed' : 'deprecated', $hook['version'] @@ -194,6 +204,22 @@ protected function trigger_error( $old_hook_name, $hook ) { } + /** + * Gets the plugin name. + * + * @return string + */ + protected function getPluginName() : string + { + if (isset($this->plugin)) { + return $this->plugin->get_plugin_name(); + } elseif(isset($this->plugin_name)) { + return $this->plugin_name; + } else { + return 'Plugin'; + } + } + } diff --git a/woocommerce/class-sv-wc-plugin-compatibility.php b/woocommerce/class-sv-wc-plugin-compatibility.php index 6512e7eb9..1b6db7737 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; use Automattic\WooCommerce\Utilities\OrderUtil; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Plugin_Compatibility' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\SV_WC_Plugin_Compatibility' ) ) : /** diff --git a/woocommerce/class-sv-wc-plugin-dependencies.php b/woocommerce/class-sv-wc-plugin-dependencies.php index d24e456d7..efdd53fcd 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Plugin_Dependencies' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\SV_WC_Plugin_Dependencies' ) ) : /** diff --git a/woocommerce/class-sv-wc-plugin-exception.php b/woocommerce/class-sv-wc-plugin-exception.php index 15a7ff637..abc23c813 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Plugin_Exception' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\SV_WC_Plugin_Exception' ) ) : /** diff --git a/woocommerce/class-sv-wc-plugin.php b/woocommerce/class-sv-wc-plugin.php index 6effbc0ee..9f98974c5 100644 --- a/woocommerce/class-sv-wc-plugin.php +++ b/woocommerce/class-sv-wc-plugin.php @@ -22,18 +22,18 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; use Automattic\WooCommerce\Utilities\FeaturesUtil; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\Handlers\Country_Helper; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\Payment_Gateway\PaymentFormContextChecker; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\Handlers\Country_Helper; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\Payment_Gateway\PaymentFormContextChecker; use stdClass; use Throwable; use WC_Logger_Interface; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Plugin' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\SV_WC_Plugin' ) ) : /** @@ -51,7 +51,7 @@ abstract class SV_WC_Plugin { /** Plugin Framework Version */ - public const VERSION = '5.15.6'; + public const VERSION = '5.15.7'; /** @var object single instance of plugin */ protected static $instance; @@ -262,10 +262,11 @@ protected function init_admin_notice_handler() { * Plugins can override this with their own handler. * * @since 5.2.0 + * @since 5.15.7 The full `SV_WC_Plugin` instance is now used to instantiate `SV_WC_Hook_Deprecator`. */ protected function init_hook_deprecator() { - $this->hook_deprecator = new SV_WC_Hook_Deprecator( $this->get_plugin_name(), array_merge( $this->get_framework_deprecated_hooks(), $this->get_deprecated_hooks() ) ); + $this->hook_deprecator = new SV_WC_Hook_Deprecator( $this, array_merge( $this->get_framework_deprecated_hooks(), $this->get_deprecated_hooks() ) ); } @@ -486,7 +487,7 @@ private function includes() { */ protected function setupClassAliases() : void { - $countryHelperAlias = '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\Country_Helper'; + $countryHelperAlias = '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\Country_Helper'; if (! class_exists($countryHelperAlias)) { class_alias( Country_Helper::class, @@ -494,7 +495,7 @@ class_alias( ); } - $paymentFormContextCheckerAlias = '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\PaymentFormContextChecker'; + $paymentFormContextCheckerAlias = '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\PaymentFormContextChecker'; if (! class_exists($paymentFormContextCheckerAlias)) { class_alias( PaymentFormContextChecker::class, diff --git a/woocommerce/class-sv-wp-admin-message-handler.php b/woocommerce/class-sv-wp-admin-message-handler.php index b1ec17967..a59a03da0 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WP_Admin_Message_Handler' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 00c38e3e7..865cf8300 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Data_Compatibility' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 397dd8eb7..80fa2d22f 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; 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_15_6\\SV_WC_Order_Compatibility' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 9e5ddb538..5a169a9d9 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Subscription_Compatibility' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 66900182b..4b59324ee 100644 --- a/woocommerce/i18n/languages/woocommerce-plugin-framework.pot +++ b/woocommerce/i18n/languages/woocommerce-plugin-framework.pot @@ -1,14 +1,14 @@ # 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" +"Project-Id-Version: SkyVerge WooCommerce Plugin Framework\n" +"Report-Msgid-Bugs-To: https://github.com/godaddy-wordpress/wc-plugin-framework/issues\n" "Last-Translator: plugins@godaddy.com\n" -"Language-Team: LANGUAGE \n" +"Language-Team: plugins@godaddy.com\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2025-03-11T16:20:07+00:00\n" +"POT-Creation-Date: 2025-04-29T21:31:58+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.11.0\n" "X-Domain: woocommerce-plugin-framework\n" @@ -286,41 +286,41 @@ msgid "Your hosting provider can do this for you. %1$sHere are some resources to msgstr "" #. translators: Placeholders: %s - plugin name -#: woocommerce/class-sv-wc-plugin.php:369 +#: woocommerce/class-sv-wc-plugin.php:370 msgid "You cannot clone instances of %s." msgstr "" #. translators: Placeholders: %s - plugin name -#: woocommerce/class-sv-wc-plugin.php:380 +#: woocommerce/class-sv-wc-plugin.php:381 msgid "You cannot unserialize instances of %s." msgstr "" #. translators: Docs as in Documentation -#: woocommerce/class-sv-wc-plugin.php:627 +#: woocommerce/class-sv-wc-plugin.php:628 msgid "Docs" msgstr "" -#: woocommerce/class-sv-wc-plugin.php:632 +#: woocommerce/class-sv-wc-plugin.php:633 msgctxt "noun" msgid "Support" msgstr "" -#: woocommerce/class-sv-wc-plugin.php:637 +#: woocommerce/class-sv-wc-plugin.php:638 msgctxt "verb" msgid "Review" msgstr "" #. translators: Placeholders: %1$s - PHP setting value, %2$s - version or value required -#: woocommerce/class-sv-wc-plugin.php:776 +#: woocommerce/class-sv-wc-plugin.php:777 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:786 +#: woocommerce/class-sv-wc-plugin.php:787 msgid "Set as %1$s - %2$s is required." msgstr "" -#: woocommerce/class-sv-wc-plugin.php:1151 +#: woocommerce/class-sv-wc-plugin.php:1152 #: woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php:807 msgid "Configure" msgstr "" diff --git a/woocommerce/payment-gateway/Blocks/Gateway_Blocks_Handler.php b/woocommerce/payment-gateway/Blocks/Gateway_Blocks_Handler.php index 5f74f0c26..30ede1c75 100644 --- a/woocommerce/payment-gateway/Blocks/Gateway_Blocks_Handler.php +++ b/woocommerce/payment-gateway/Blocks/Gateway_Blocks_Handler.php @@ -1,13 +1,13 @@ 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_15_7', $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 b9a0853ea..0ad607e31 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_15_6\Payment_Gateway\External_Checkout\Google_Pay; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7\Payment_Gateway\External_Checkout\Google_Pay; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\SV_WC_Helper; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\SV_WC_Payment_Gateway_Exception; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\SV_WC_Helper; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\SV_WC_Payment_Gateway_Exception; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\Payment_Gateway\\External_Checkout\\Google_Pay\\AJAX' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 bc2251cd8..62dbd6535 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_15_6\Payment_Gateway\External_Checkout\Google_Pay; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7\Payment_Gateway\External_Checkout\Google_Pay; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\SV_WC_Helper; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\SV_WC_Helper; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\Payment_Gateway\\External_Checkout\\Google_Pay\\Admin' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\Payment_Gateway\\External_Checkout\\Google_Pay\\Admin' ) ) : /** @@ -37,7 +37,7 @@ * @since 5.10.0 */ #[\AllowDynamicProperties] -class Admin extends \SkyVerge\WooCommerce\PluginFramework\v5_15_6\Payment_Gateway\External_Checkout\Admin { +class Admin extends \SkyVerge\WooCommerce\PluginFramework\v5_15_7\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 4c798cfc4..231f040c8 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_15_6\Payment_Gateway\External_Checkout\Google_Pay; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7\Payment_Gateway\External_Checkout\Google_Pay; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\SV_WC_Payment_Gateway_Exception; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\SV_WC_Payment_Gateway_Plugin; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\SV_WC_Payment_Gateway_Exception; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\SV_WC_Payment_Gateway_Plugin; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\Payment_Gateway\\External_Checkout\\Google_Pay\\Frontend' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\Payment_Gateway\\External_Checkout\\Google_Pay\\Frontend' ) ) : /** @@ -38,7 +38,7 @@ * @since 5.10.0 */ #[\AllowDynamicProperties] -class Frontend extends \SkyVerge\WooCommerce\PluginFramework\v5_15_6\Payment_Gateway\External_Checkout\Frontend { +class Frontend extends \SkyVerge\WooCommerce\PluginFramework\v5_15_7\Payment_Gateway\External_Checkout\Frontend { /** @var string JS handler base class name, without the FW version */ @@ -102,7 +102,7 @@ public function enqueue_scripts() { $version = $gateway->get_plugin()->get_assets_version( $gateway->get_id() ); wp_enqueue_script( 'google-pay-js-library', 'https://pay.google.com/gp/p/js/pay.js', [], $version, true ); - wp_enqueue_script( 'sv-wc-google-pay-v5_15_6', $this->get_plugin()->get_payment_gateway_framework_assets_url() . '/dist/frontend/sv-wc-payment-gateway-google-pay.js', [ 'google-pay-js-library', 'jquery' ], $version, true ); + wp_enqueue_script( 'sv-wc-google-pay-v5_15_7', $this->get_plugin()->get_payment_gateway_framework_assets_url() . '/dist/frontend/sv-wc-payment-gateway-google-pay.js', [ 'google-pay-js-library', 'jquery' ], $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 0360af6db..15e4fb456 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_15_6\Payment_Gateway\External_Checkout\Google_Pay; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7\Payment_Gateway\External_Checkout\Google_Pay; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\Payment_Gateway\External_Checkout\External_Checkout; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\Payment_Gateway\External_Checkout\Orders; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\SV_WC_Payment_Gateway_Exception; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\SV_WC_Payment_Gateway_Helper; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\SV_WC_Payment_Gateway_Plugin; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\Payment_Gateway\External_Checkout\External_Checkout; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\Payment_Gateway\External_Checkout\Orders; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\SV_WC_Payment_Gateway_Exception; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\SV_WC_Payment_Gateway_Helper; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\SV_WC_Payment_Gateway_Plugin; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\Payment_Gateway\\External_Checkout\\Google_Pay\\Google_Pay' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\Payment_Gateway\\External_Checkout\\Google_Pay\\Google_Pay' ) ) : /** @@ -677,7 +677,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_15_6\\SV_WC_Payment_Gateway_Helper::normalize_card_type', $accepted_card_types ); + $accepted_card_types = array_map( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 cc4bec81e..b64d84b9d 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_15_6\Payment_Gateway\External_Checkout; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7\Payment_Gateway\External_Checkout; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6 as Framework; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7 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 b3db1eecc..0173dd91a 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Payment_Gateway_Apple_Pay_API_Request' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 365fa21bd..69803ea5d 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Payment_Gateway_Apple_Pay_API_Response' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 e28e8037f..aebf4310a 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Payment_Gateway_Apple_Pay_API' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\SV_WC_Payment_Gateway_Apple_Pay_API' ) ) : /** @@ -58,7 +58,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_15_6\\SV_WC_Payment_Gateway_Apple_Pay_API_Response' ); + $this->set_response_handler( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 cc25e332f..8bec5b963 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Payment_Gateway_Apple_Pay_Payment_Response' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 396c67ce9..56962346e 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\Payment_Gateway\External_Checkout\Admin; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\Payment_Gateway\External_Checkout\Admin; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Payment_Gateway_Apple_Pay_Admin' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 123408cff..7fc40f9dc 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Payment_Gateway_Apple_Pay_AJAX' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 2408ac840..78d86bb90 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Payment_Gateway_Apple_Pay_Frontend' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\SV_WC_Payment_Gateway_Apple_Pay_Frontend' ) ) : /** @@ -35,7 +35,7 @@ * @since 4.7.0 */ #[\AllowDynamicProperties] -class SV_WC_Payment_Gateway_Apple_Pay_Frontend extends \SkyVerge\WooCommerce\PluginFramework\v5_15_6\Payment_Gateway\External_Checkout\Frontend { +class SV_WC_Payment_Gateway_Apple_Pay_Frontend extends \SkyVerge\WooCommerce\PluginFramework\v5_15_7\Payment_Gateway\External_Checkout\Frontend { /** @var string JS handler base class name, without the FW version */ @@ -116,9 +116,9 @@ public function enqueue_scripts() { $gateway = $this->get_gateway(); $version = $gateway->get_plugin()->get_assets_version( $gateway->get_id() ); - wp_enqueue_style( 'sv-wc-apple-pay-v5_15_6', $this->get_plugin()->get_payment_gateway_framework_assets_url() . '/css/frontend/sv-wc-payment-gateway-apple-pay.css', [], $version ); // TODO: min + wp_enqueue_style( 'sv-wc-apple-pay-v5_15_7', $this->get_plugin()->get_payment_gateway_framework_assets_url() . '/css/frontend/sv-wc-payment-gateway-apple-pay.css', [], $version ); // TODO: min - wp_enqueue_script( 'sv-wc-apple-pay-v5_15_6', $this->get_plugin()->get_payment_gateway_framework_assets_url() . '/dist/frontend/sv-wc-payment-gateway-apple-pay.js', [ 'jquery' ], $version, true ); + wp_enqueue_script( 'sv-wc-apple-pay-v5_15_7', $this->get_plugin()->get_payment_gateway_framework_assets_url() . '/dist/frontend/sv-wc-payment-gateway-apple-pay.js', [ 'jquery' ], $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 4e1610c49..29e5ebc19 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\Payment_Gateway\External_Checkout\Orders; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\Payment_Gateway\External_Checkout\Orders; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Payment_Gateway_Apple_Pay' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\SV_WC_Payment_Gateway_Apple_Pay' ) ) : /** @@ -937,7 +937,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_15_6\\SV_WC_Payment_Gateway_Helper::normalize_card_type', $accepted_card_types ); + $accepted_card_types = array_map( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 e21fb2768..e391bec05 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_15_6\Payment_Gateway\Handlers; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7\Payment_Gateway\Handlers; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6 as FrameworkBase; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7 as FrameworkBase; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\Payment_Gateway\\Handlers\\Abstract_Hosted_Payment_Handler' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 147404b88..b71ef1a71 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_15_6\Payment_Gateway\Handlers; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7\Payment_Gateway\Handlers; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6 as FrameworkBase; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7 as FrameworkBase; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\Payment_Gateway\\Handlers\\Abstract_Payment_Handler' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\Payment_Gateway\\Handlers\\Abstract_Payment_Handler' ) ) : /** diff --git a/woocommerce/payment-gateway/Handlers/Capture.php b/woocommerce/payment-gateway/Handlers/Capture.php index 55f684e21..dd68013f2 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_15_6\Payment_Gateway\Handlers; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7\Payment_Gateway\Handlers; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6 as Framework; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7 as Framework; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\Payment_Gateway\\Handlers\\Capture' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\Payment_Gateway\\Handlers\\Capture' ) ) : /** diff --git a/woocommerce/payment-gateway/PaymentFormContextChecker.php b/woocommerce/payment-gateway/PaymentFormContextChecker.php index d5579c9d4..4da89efe8 100644 --- a/woocommerce/payment-gateway/PaymentFormContextChecker.php +++ b/woocommerce/payment-gateway/PaymentFormContextChecker.php @@ -1,9 +1,9 @@
  • '+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()}}]),t}(),e(document.body).trigger("sv_wc_google_pay_handler_v5_15_6_loaded")}); +function e(e,t,n,a){Object.defineProperty(e,t,{get:n,set:a,enumerable:!0,configurable:!0})}var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},n={},a={},o=t.parcelRequire94c2;null==o&&((o=function(e){if(e in n)return n[e].exports;if(e in a){var t=a[e];delete a[e];var o={id:e,exports:{}};return n[e]=o,t.call(o.exports,o,o.exports),o.exports}var i=Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}).register=function(e,t){a[e]=t},t.parcelRequire94c2=o);var i=o.register;i("guLUH",function(t,n){e(t.exports,"_",function(){return a});function a(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}}),i("90XvN",function(t,n){function a(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()}}]),t}(),e(document.body).trigger("sv_wc_google_pay_handler_v5_15_7_loaded")}); //# sourceMappingURL=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 3236d050d..41cb06afd 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 @@ -{"mappings":"A,S,E,C,C,C,C,C,C,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WACC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAE,CAAE,QAAS,KAAM,WAAY,CAAE,WAAY,OAAQ,QAAS,EAAI,CAAE,EACzF,C,E,CAKA,IAAA,YAAA,MAAA,WACC,IAAI,CAAC,SAAS,CAAC,OAAO,EACvB,C,E,E,C,IAGD,EAAG,SAAS,IAAI,EAAG,OAAO,CAAE,0CAE7B","sources":["","node_modules/@swc/helpers/esm/_class_call_check.js","node_modules/@swc/helpers/esm/_create_class.js","woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-google-pay.js"],"sourcesContent":["\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n var $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequire94c2\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequire94c2\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nparcelRegister(\"guLUH\", function(module, exports) {\n\n$parcel$export(module.exports, \"_\", function () { return $c0249d4a3fc9bb83$export$71511d61b312f219; });\nfunction $c0249d4a3fc9bb83$export$71511d61b312f219(instance, Constructor) {\n if (!(instance instanceof Constructor)) throw new TypeError(\"Cannot call a class as a function\");\n}\n\n});\n\nparcelRegister(\"90XvN\", function(module, exports) {\n\n$parcel$export(module.exports, \"_\", function () { return $690246f0b6925227$export$71511d61b312f219; });\nfunction $690246f0b6925227$var$_defineProperties(target, props) {\n for(var i = 0; i < props.length; i++){\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction $690246f0b6925227$export$71511d61b312f219(Constructor, protoProps, staticProps) {\n if (protoProps) $690246f0b6925227$var$_defineProperties(Constructor.prototype, protoProps);\n if (staticProps) $690246f0b6925227$var$_defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\n});\n\n\nvar $guLUH = parcelRequire(\"guLUH\");\n\nvar $90XvN = parcelRequire(\"90XvN\");\njQuery(function($) {\n \"use strict\";\n /**\n\t * Google Pay handler.\n\t *\n\t * @since 5.10.0\n\t *\n\t * @type {SV_WC_Google_Pay_Handler_v5_15_6} object\n\t */ window.SV_WC_Google_Pay_Handler_v5_15_6 = /*#__PURE__*/ function() {\n function SV_WC_Google_Pay_Handler_v5_15_6(params) {\n (0, $guLUH._)(this, SV_WC_Google_Pay_Handler_v5_15_6);\n var plugin_id = params.plugin_id, merchant_id = params.merchant_id, merchant_name = params.merchant_name, gateway_id = params.gateway_id, gateway_id_dasherized = params.gateway_id_dasherized, gateway_merchant_id = params.gateway_merchant_id, environment = params.environment, ajax_url = params.ajax_url, recalculate_totals_nonce = params.recalculate_totals_nonce, process_nonce = params.process_nonce, button_style = params.button_style, card_types = params.card_types, available_countries = params.available_countries, currency_code = params.currency_code, needs_shipping = params.needs_shipping, generic_error = params.generic_error;\n this.gatewayID = gateway_id;\n this.gatewayMerchantID = gateway_merchant_id;\n this.merchantID = merchant_id;\n this.merchantName = merchant_name;\n this.environment = environment;\n this.ajaxURL = ajax_url;\n this.recalculateTotalsNonce = recalculate_totals_nonce;\n this.processNonce = process_nonce;\n this.buttonStyle = button_style;\n this.availableCountries = available_countries;\n this.currencyCode = currency_code;\n this.needsShipping = needs_shipping;\n this.genericError = generic_error;\n if (params.product_id) this.productID = params.product_id;\n /**\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 */ var allowedCardNetworks = card_types;\n /**\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 */ this.baseRequest = {\n apiVersion: 2,\n apiVersionMinor: 0\n };\n /**\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 */ var allowedCardAuthMethods = [\n 'PAN_ONLY',\n 'CRYPTOGRAM_3DS'\n ];\n /**\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 */ var tokenizationSpecification = {\n type: 'PAYMENT_GATEWAY',\n parameters: {\n 'gateway': plugin_id,\n 'gatewayMerchantId': this.gatewayMerchantID\n }\n };\n /**\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 */ this.baseCardPaymentMethod = {\n type: 'CARD',\n parameters: {\n allowedAuthMethods: allowedCardAuthMethods,\n allowedCardNetworks: allowedCardNetworks,\n billingAddressRequired: true,\n billingAddressParameters: {\n format: 'FULL',\n phoneNumberRequired: true\n }\n }\n };\n /**\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 */ this.cardPaymentMethod = Object.assign({}, this.baseCardPaymentMethod, {\n tokenizationSpecification: tokenizationSpecification\n });\n /**\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 */ this.paymentsClient = null;\n }\n (0, $90XvN._)(SV_WC_Google_Pay_Handler_v5_15_6, [\n {\n /**\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 */ key: \"getGoogleIsReadyToPayRequest\",\n value: function getGoogleIsReadyToPayRequest() {\n return Object.assign({}, this.baseRequest, {\n allowedPaymentMethods: [\n this.baseCardPaymentMethod\n ]\n });\n }\n },\n {\n /**\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 */ key: \"getGooglePaymentDataRequest\",\n value: function getGooglePaymentDataRequest(resolve) {\n var _this = this;\n return this.getGoogleTransactionInfo(function(transactionInfo) {\n var paymentDataRequest = Object.assign({}, _this.baseRequest);\n paymentDataRequest.allowedPaymentMethods = [\n _this.cardPaymentMethod\n ];\n paymentDataRequest.transactionInfo = transactionInfo;\n paymentDataRequest.merchantInfo = {\n merchantId: _this.merchantID,\n merchantName: _this.merchantName\n };\n paymentDataRequest.emailRequired = true;\n paymentDataRequest.callbackIntents = [\n 'PAYMENT_AUTHORIZATION'\n ];\n if (_this.needsShipping) {\n paymentDataRequest.callbackIntents = [\n 'SHIPPING_ADDRESS',\n 'SHIPPING_OPTION',\n 'PAYMENT_AUTHORIZATION'\n ];\n paymentDataRequest.shippingAddressRequired = true;\n paymentDataRequest.shippingAddressParameters = _this.getGoogleShippingAddressParameters();\n paymentDataRequest.shippingOptionRequired = true;\n }\n resolve(paymentDataRequest);\n });\n }\n },\n {\n /**\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 */ key: \"getGooglePaymentsClient\",\n value: function getGooglePaymentsClient() {\n var _this = this;\n if (this.paymentsClient === null) {\n var args = {\n environment: this.environment,\n merchantInfo: {\n merchantName: this.merchantName,\n merchantId: this.merchantID\n },\n paymentDataCallbacks: {\n onPaymentAuthorized: function(paymentData) {\n return _this.onPaymentAuthorized(paymentData);\n }\n }\n };\n if (this.needsShipping) args.paymentDataCallbacks.onPaymentDataChanged = function(paymentData) {\n return _this.onPaymentDataChanged(paymentData);\n };\n this.paymentsClient = new google.payments.api.PaymentsClient(args);\n }\n return this.paymentsClient;\n }\n },\n {\n /**\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 */ key: \"onPaymentAuthorized\",\n value: function onPaymentAuthorized(paymentData) {\n var _this = this;\n this.blockUI();\n return new Promise(function(resolve, reject) {\n // handle the response\n try {\n _this.processPayment(paymentData, resolve);\n } catch (err) {\n reject({\n transactionState: 'ERROR',\n error: {\n intent: 'PAYMENT_AUTHORIZATION',\n message: 'Payment could not be processed',\n reason: 'PAYMENT_DATA_INVALID'\n }\n });\n }\n _this.unblockUI();\n });\n }\n },\n {\n /**\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 */ key: \"onPaymentDataChanged\",\n value: function onPaymentDataChanged(intermediatePaymentData) {\n var _this = this;\n this.blockUI();\n return new Promise(function(resolve, reject) {\n try {\n var shippingAddress = intermediatePaymentData.shippingAddress;\n var shippingOptionData = intermediatePaymentData.shippingOptionData;\n var chosenShippingMethod = '';\n if (intermediatePaymentData.callbackTrigger == 'SHIPPING_OPTION') chosenShippingMethod = shippingOptionData.id;\n _this.getUpdatedTotals(shippingAddress, chosenShippingMethod, function(paymentDataRequestUpdate) {\n if (paymentDataRequestUpdate.newShippingOptionParameters.shippingOptions.length == 0) paymentDataRequestUpdate = {\n error: _this.getGoogleUnserviceableAddressError()\n };\n resolve(paymentDataRequestUpdate);\n });\n } catch (err) {\n _this.failPayment('Could not load updated totals or process payment data request update. ' + err);\n }\n _this.unblockUI();\n });\n }\n },\n {\n /**\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 */ key: \"getGoogleTransactionInfo\",\n value: function getGoogleTransactionInfo(resolve) {\n var _this = this;\n // get transaction info from cart\n var data = {\n action: \"wc_\".concat(this.gatewayID, \"_google_pay_get_transaction_info\")\n };\n if (this.productID) data.productID = this.productID;\n $.post(this.ajaxURL, data, function(response) {\n if (response.success) resolve(JSON.parse(response.data));\n else _this.failPayment('Could not build transaction info. ' + response.data.message);\n });\n }\n },\n {\n /**\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 */ key: \"getUpdatedTotals\",\n value: function getUpdatedTotals(shippingAddress, shippingMethod, resolve) {\n var _this = this;\n var data = {\n action: \"wc_\".concat(this.gatewayID, \"_google_pay_recalculate_totals\"),\n 'nonce': this.recalculateTotalsNonce,\n shippingAddress: shippingAddress,\n shippingMethod: shippingMethod\n };\n if (this.productID) data.productID = this.productID;\n $.post(this.ajaxURL, data, function(response) {\n if (response.success) resolve(JSON.parse(response.data));\n else _this.failPayment('Could not recalculate totals. ' + response.data.message);\n });\n }\n },\n {\n /**\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 */ key: \"getGoogleShippingAddressParameters\",\n value: function getGoogleShippingAddressParameters() {\n return {\n allowedCountryCodes: this.availableCountries\n };\n }\n },\n {\n /**\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 */ key: \"getGoogleUnserviceableAddressError\",\n value: function getGoogleUnserviceableAddressError() {\n return {\n reason: 'SHIPPING_ADDRESS_UNSERVICEABLE',\n message: 'Cannot ship to the selected address',\n intent: 'SHIPPING_ADDRESS'\n };\n }\n },\n {\n /**\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 */ key: \"addGooglePayButton\",\n value: function addGooglePayButton() {\n var _this = this;\n var paymentsClient = this.getGooglePaymentsClient();\n var button = paymentsClient.createButton({\n onClick: function(event) {\n return _this.onGooglePaymentButtonClicked(event);\n },\n buttonColor: this.buttonStyle,\n buttonSizeMode: 'fill'\n });\n document.getElementById('sv-wc-google-pay-button-container').appendChild(button);\n }\n },\n {\n /**\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 */ key: \"prefetchGooglePaymentData\",\n value: function prefetchGooglePaymentData() {\n var _this = this;\n this.getGooglePaymentDataRequest(function(paymentDataRequest) {\n // transactionInfo must be set but does not affect cache\n paymentDataRequest.transactionInfo = {\n totalPriceStatus: 'NOT_CURRENTLY_KNOWN',\n currencyCode: _this.currencyCode\n };\n var paymentsClient = _this.getGooglePaymentsClient();\n paymentsClient.prefetchPaymentData(paymentDataRequest);\n });\n }\n },\n {\n /**\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 */ key: \"processPayment\",\n value: function processPayment(paymentData, resolve) {\n var _this = this;\n // pass payment token to your gateway to process payment\n var data = {\n action: \"wc_\".concat(this.gatewayID, \"_google_pay_process_payment\"),\n nonce: this.processNonce,\n paymentData: JSON.stringify(paymentData)\n };\n if (this.productID && !this.needsShipping) data.productID = this.productID;\n return $.post(this.ajaxURL, data, function(response) {\n if (response.success) {\n resolve({\n transactionState: 'SUCCESS'\n });\n window.location = response.data.redirect;\n } else {\n resolve({\n transactionState: 'ERROR',\n error: {\n intent: 'SHIPPING_ADDRESS',\n message: 'Invalid data',\n reason: 'PAYMENT_DATA_INVALID'\n }\n });\n _this.failPayment('Payment could not be processed. ' + response.data.message);\n }\n });\n }\n },\n {\n /**\n\t\t * Show Google Pay payment sheet when Google Pay payment button is clicked\n\t\t */ key: \"onGooglePaymentButtonClicked\",\n value: function onGooglePaymentButtonClicked(event) {\n var _this = this;\n event.preventDefault();\n this.blockUI();\n this.getGooglePaymentDataRequest(function(paymentDataRequest) {\n var paymentsClient = _this.getGooglePaymentsClient();\n try {\n paymentsClient.loadPaymentData(paymentDataRequest);\n } catch (err) {\n _this.failPayment('Could not load payment data. ' + err);\n }\n _this.unblockUI();\n });\n }\n },\n {\n /**\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 */ key: \"init\",\n value: function init() {\n // initialize for the various pages\n if ($('form.cart').length) this.initProductPage();\n else if ($('form.woocommerce-cart-form').length) this.initCartPage();\n else if ($('form.woocommerce-checkout').length) this.initCheckoutPage();\n else return;\n this.initGooglePay();\n }\n },\n {\n /**\n\t\t * Initializes Google Pay.\n\t\t */ key: \"initGooglePay\",\n value: function initGooglePay() {\n var _this = this;\n var paymentsClient = this.getGooglePaymentsClient();\n paymentsClient.isReadyToPay(this.getGoogleIsReadyToPayRequest()).then(function(response) {\n if (response.result) {\n _this.addGooglePayButton();\n // prefetch payment data to improve performance\n _this.prefetchGooglePaymentData();\n }\n }).catch(function(err) {\n _this.failPayment('Google Pay is not ready. ' + err);\n });\n }\n },\n {\n /**\n\t\t * Initializes the product page.\n\t\t */ key: \"initProductPage\",\n value: function initProductPage() {\n this.uiElement = $('form.cart');\n }\n },\n {\n /**\n\t\t * Initializes the cart page.\n\t\t */ key: \"initCartPage\",\n value: function initCartPage() {\n var _this = this;\n this.uiElement = $('form.woocommerce-cart-form').parents('div.woocommerce');\n // re-init if the cart totals are updated\n $(document.body).on('updated_cart_totals', function() {\n _this.initGooglePay();\n });\n }\n },\n {\n /**\n\t\t * Initializes the checkout page.\n\t\t */ key: \"initCheckoutPage\",\n value: function initCheckoutPage() {\n this.uiElement = $('form.woocommerce-checkout');\n }\n },\n {\n /**\n\t\t * Fails the purchase based on the gateway result.\n\t\t */ key: \"failPayment\",\n value: function failPayment(error) {\n console.error('[Google Pay] ' + error);\n this.unblockUI();\n this.renderErrors([\n this.genericError\n ]);\n }\n },\n {\n /**\n\t\t * Renders any new errors and bring them into the viewport.\n \t\t */ key: \"renderErrors\",\n value: function renderErrors(errors) {\n // hide and remove any previous errors\n $('.woocommerce-error, .woocommerce-message').remove();\n // add errors\n this.uiElement.prepend('
    • ' + errors.join('
    • ') + '
    ');\n // unblock UI\n this.uiElement.removeClass('processing').unblock();\n // scroll to top\n $('html, body').animate({\n scrollTop: this.uiElement.offset().top - 100\n }, 1000);\n }\n },\n {\n /**\n\t\t * Blocks the payment form UI.\n\t\t */ key: \"blockUI\",\n value: function blockUI() {\n this.uiElement.block({\n message: null,\n overlayCSS: {\n background: '#fff',\n opacity: 0.6\n }\n });\n }\n },\n {\n /**\n\t\t * Unblocks the payment form UI.\n\t\t */ key: \"unblockUI\",\n value: function unblockUI() {\n this.uiElement.unblock();\n }\n }\n ]);\n return SV_WC_Google_Pay_Handler_v5_15_6;\n }();\n $(document.body).trigger('sv_wc_google_pay_handler_v5_15_6_loaded');\n});\n\n\n//# sourceMappingURL=sv-wc-payment-gateway-google-pay.js.map\n","function _class_call_check(instance, Constructor) {\n if (!(instance instanceof Constructor)) throw new TypeError(\"Cannot call a class as a function\");\n}\nexport { _class_call_check as _ };\n","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n\n if (\"value\" in descriptor) descriptor.writable = true;\n\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _create_class(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n\n return Constructor;\n}\nexport { _create_class as _ };\n","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_15_6} object\n\t */\n\twindow.SV_WC_Google_Pay_Handler_v5_15_6 = class SV_WC_Google_Pay_Handler_v5_15_6 {\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.gateway_merchant_id The gateway merchant ID\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\tgateway_merchant_id,\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.gatewayMerchantID = gateway_merchant_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.gatewayMerchantID\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_15_6_loaded' );\n\n} );\n"],"names":["$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","$parcel$global","globalThis","self","window","global","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","parcelRegister","$c0249d4a3fc9bb83$export$71511d61b312f219","instance","Constructor","TypeError","$690246f0b6925227$var$_defineProperties","target","props","i","length","descriptor","writable","key","$690246f0b6925227$export$71511d61b312f219","protoProps","staticProps","prototype","$guLUH","$90XvN","jQuery","$","SV_WC_Google_Pay_Handler_v5_15_6","params","_","plugin_id","merchant_id","merchant_name","gateway_id","gateway_merchant_id","gateway_id_dasherized","environment","ajax_url","recalculate_totals_nonce","process_nonce","button_style","card_types","available_countries","currency_code","needs_shipping","generic_error","gatewayID","gatewayMerchantID","merchantID","merchantName","ajaxURL","recalculateTotalsNonce","processNonce","buttonStyle","availableCountries","currencyCode","needsShipping","genericError","product_id","productID","baseRequest","apiVersion","apiVersionMinor","tokenizationSpecification","type","parameters","baseCardPaymentMethod","allowedAuthMethods","allowedCardNetworks","billingAddressRequired","billingAddressParameters","format","phoneNumberRequired","cardPaymentMethod","assign","paymentsClient","value","allowedPaymentMethods","resolve","_this","getGoogleTransactionInfo","transactionInfo","paymentDataRequest","merchantInfo","merchantId","emailRequired","callbackIntents","shippingAddressRequired","shippingAddressParameters","getGoogleShippingAddressParameters","shippingOptionRequired","args","paymentDataCallbacks","onPaymentAuthorized","paymentData","onPaymentDataChanged","google","payments","api","PaymentsClient","blockUI","Promise","reject","processPayment","transactionState","error","intent","message","reason","unblockUI","intermediatePaymentData","shippingAddress","shippingOptionData","chosenShippingMethod","callbackTrigger","getUpdatedTotals","paymentDataRequestUpdate","newShippingOptionParameters","shippingOptions","getGoogleUnserviceableAddressError","failPayment","data","action","concat","post","response","success","JSON","parse","shippingMethod","allowedCountryCodes","button","getGooglePaymentsClient","createButton","onClick","event","onGooglePaymentButtonClicked","buttonColor","buttonSizeMode","document","getElementById","appendChild","getGooglePaymentDataRequest","totalPriceStatus","prefetchPaymentData","nonce","stringify","location","redirect","preventDefault","loadPaymentData","initProductPage","initCartPage","initCheckoutPage","initGooglePay","isReadyToPay","getGoogleIsReadyToPayRequest","then","result","addGooglePayButton","prefetchGooglePaymentData","catch","uiElement","parents","body","on","console","renderErrors","errors","remove","prepend","join","removeClass","unblock","animate","scrollTop","offset","top","block","overlayCSS","background","opacity","trigger"],"version":3,"file":"sv-wc-payment-gateway-google-pay.js.map","sourceRoot":"../../../../../"} \ No newline at end of file +{"mappings":"A,S,E,C,C,C,C,C,C,C,E,O,c,C,E,E,C,I,E,I,E,W,C,E,a,C,C,E,C,I,E,A,a,O,W,W,A,a,O,K,K,A,a,O,O,O,A,a,O,O,O,C,E,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,I,E,E,Q,C,E,Q,S,C,C,C,E,E,E,O,C,I,W,O,C,GCAA,SAAS,EAAkB,CAAQ,CAAE,CAAW,EAC5C,GAAI,CAAE,CAAA,aAAoB,CAAA,EAAc,MAAM,AAAI,UAAU,oCAChE,C,G,E,Q,S,C,C,C,ECFA,SAAS,EAAkB,CAAM,CAAE,CAAK,EACpC,IAAK,IAAI,EAAI,EAAG,EAAI,EAAM,MAAM,CAAE,IAAK,CACnC,IAAI,EA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,CAKA,IAAA,mBAAA,MAAA,WACC,IAAI,CAAC,SAAS,CAAG,EAAG,4BACrB,C,E,CAKA,IAAA,cAAA,MAAA,SAAa,CAAK,EAEjB,QAAQ,KAAK,CAAE,gBAAkB,GAEjC,IAAI,CAAC,SAAS,GAEd,IAAI,CAAC,YAAY,CAAE,CAAE,IAAI,CAAC,YAAY,CAAE,CACzC,C,E,CAKA,IAAA,eAAA,MAAA,SAAc,CAAM,EAGnB,EAAG,4CAA6C,MAAM,GAGtD,IAAI,CAAC,SAAS,CAAC,OAAO,CAAE,qCAAuC,EAAO,IAAI,CAAE,aAAgB,cAG5F,IAAI,CAAC,SAAS,CAAC,WAAW,CAAE,cAAe,OAAO,GAGlD,EAAG,cAAe,OAAO,CAAE,CAAE,UAAW,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,GAAG,CAAG,GAAI,EAAG,IAC9E,C,E,CAKA,IAAA,UAAA,MAAA,WACC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAE,CAAE,QAAS,KAAM,WAAY,CAAE,WAAY,OAAQ,QAAS,EAAI,CAAE,EACzF,C,E,CAKA,IAAA,YAAA,MAAA,WACC,IAAI,CAAC,SAAS,CAAC,OAAO,EACvB,C,E,E,C,IAGD,EAAG,SAAS,IAAI,EAAG,OAAO,CAAE,0CAE7B","sources":["","node_modules/@swc/helpers/esm/_class_call_check.js","node_modules/@swc/helpers/esm/_create_class.js","woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-google-pay.js"],"sourcesContent":["\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n var $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequire94c2\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequire94c2\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nparcelRegister(\"guLUH\", function(module, exports) {\n\n$parcel$export(module.exports, \"_\", function () { return $c0249d4a3fc9bb83$export$71511d61b312f219; });\nfunction $c0249d4a3fc9bb83$export$71511d61b312f219(instance, Constructor) {\n if (!(instance instanceof Constructor)) throw new TypeError(\"Cannot call a class as a function\");\n}\n\n});\n\nparcelRegister(\"90XvN\", function(module, exports) {\n\n$parcel$export(module.exports, \"_\", function () { return $690246f0b6925227$export$71511d61b312f219; });\nfunction $690246f0b6925227$var$_defineProperties(target, props) {\n for(var i = 0; i < props.length; i++){\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction $690246f0b6925227$export$71511d61b312f219(Constructor, protoProps, staticProps) {\n if (protoProps) $690246f0b6925227$var$_defineProperties(Constructor.prototype, protoProps);\n if (staticProps) $690246f0b6925227$var$_defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\n});\n\n\nvar $guLUH = parcelRequire(\"guLUH\");\n\nvar $90XvN = parcelRequire(\"90XvN\");\njQuery(function($) {\n \"use strict\";\n /**\n\t * Google Pay handler.\n\t *\n\t * @since 5.10.0\n\t *\n\t * @type {SV_WC_Google_Pay_Handler_v5_15_7} object\n\t */ window.SV_WC_Google_Pay_Handler_v5_15_7 = /*#__PURE__*/ function() {\n function SV_WC_Google_Pay_Handler_v5_15_7(params) {\n (0, $guLUH._)(this, SV_WC_Google_Pay_Handler_v5_15_7);\n var plugin_id = params.plugin_id, merchant_id = params.merchant_id, merchant_name = params.merchant_name, gateway_id = params.gateway_id, gateway_id_dasherized = params.gateway_id_dasherized, gateway_merchant_id = params.gateway_merchant_id, environment = params.environment, ajax_url = params.ajax_url, recalculate_totals_nonce = params.recalculate_totals_nonce, process_nonce = params.process_nonce, button_style = params.button_style, card_types = params.card_types, available_countries = params.available_countries, currency_code = params.currency_code, needs_shipping = params.needs_shipping, generic_error = params.generic_error;\n this.gatewayID = gateway_id;\n this.gatewayMerchantID = gateway_merchant_id;\n this.merchantID = merchant_id;\n this.merchantName = merchant_name;\n this.environment = environment;\n this.ajaxURL = ajax_url;\n this.recalculateTotalsNonce = recalculate_totals_nonce;\n this.processNonce = process_nonce;\n this.buttonStyle = button_style;\n this.availableCountries = available_countries;\n this.currencyCode = currency_code;\n this.needsShipping = needs_shipping;\n this.genericError = generic_error;\n if (params.product_id) this.productID = params.product_id;\n /**\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 */ var allowedCardNetworks = card_types;\n /**\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 */ this.baseRequest = {\n apiVersion: 2,\n apiVersionMinor: 0\n };\n /**\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 */ var allowedCardAuthMethods = [\n 'PAN_ONLY',\n 'CRYPTOGRAM_3DS'\n ];\n /**\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 */ var tokenizationSpecification = {\n type: 'PAYMENT_GATEWAY',\n parameters: {\n 'gateway': plugin_id,\n 'gatewayMerchantId': this.gatewayMerchantID\n }\n };\n /**\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 */ this.baseCardPaymentMethod = {\n type: 'CARD',\n parameters: {\n allowedAuthMethods: allowedCardAuthMethods,\n allowedCardNetworks: allowedCardNetworks,\n billingAddressRequired: true,\n billingAddressParameters: {\n format: 'FULL',\n phoneNumberRequired: true\n }\n }\n };\n /**\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 */ this.cardPaymentMethod = Object.assign({}, this.baseCardPaymentMethod, {\n tokenizationSpecification: tokenizationSpecification\n });\n /**\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 */ this.paymentsClient = null;\n }\n (0, $90XvN._)(SV_WC_Google_Pay_Handler_v5_15_7, [\n {\n /**\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 */ key: \"getGoogleIsReadyToPayRequest\",\n value: function getGoogleIsReadyToPayRequest() {\n return Object.assign({}, this.baseRequest, {\n allowedPaymentMethods: [\n this.baseCardPaymentMethod\n ]\n });\n }\n },\n {\n /**\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 */ key: \"getGooglePaymentDataRequest\",\n value: function getGooglePaymentDataRequest(resolve) {\n var _this = this;\n return this.getGoogleTransactionInfo(function(transactionInfo) {\n var paymentDataRequest = Object.assign({}, _this.baseRequest);\n paymentDataRequest.allowedPaymentMethods = [\n _this.cardPaymentMethod\n ];\n paymentDataRequest.transactionInfo = transactionInfo;\n paymentDataRequest.merchantInfo = {\n merchantId: _this.merchantID,\n merchantName: _this.merchantName\n };\n paymentDataRequest.emailRequired = true;\n paymentDataRequest.callbackIntents = [\n 'PAYMENT_AUTHORIZATION'\n ];\n if (_this.needsShipping) {\n paymentDataRequest.callbackIntents = [\n 'SHIPPING_ADDRESS',\n 'SHIPPING_OPTION',\n 'PAYMENT_AUTHORIZATION'\n ];\n paymentDataRequest.shippingAddressRequired = true;\n paymentDataRequest.shippingAddressParameters = _this.getGoogleShippingAddressParameters();\n paymentDataRequest.shippingOptionRequired = true;\n }\n resolve(paymentDataRequest);\n });\n }\n },\n {\n /**\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 */ key: \"getGooglePaymentsClient\",\n value: function getGooglePaymentsClient() {\n var _this = this;\n if (this.paymentsClient === null) {\n var args = {\n environment: this.environment,\n merchantInfo: {\n merchantName: this.merchantName,\n merchantId: this.merchantID\n },\n paymentDataCallbacks: {\n onPaymentAuthorized: function(paymentData) {\n return _this.onPaymentAuthorized(paymentData);\n }\n }\n };\n if (this.needsShipping) args.paymentDataCallbacks.onPaymentDataChanged = function(paymentData) {\n return _this.onPaymentDataChanged(paymentData);\n };\n this.paymentsClient = new google.payments.api.PaymentsClient(args);\n }\n return this.paymentsClient;\n }\n },\n {\n /**\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 */ key: \"onPaymentAuthorized\",\n value: function onPaymentAuthorized(paymentData) {\n var _this = this;\n this.blockUI();\n return new Promise(function(resolve, reject) {\n // handle the response\n try {\n _this.processPayment(paymentData, resolve);\n } catch (err) {\n reject({\n transactionState: 'ERROR',\n error: {\n intent: 'PAYMENT_AUTHORIZATION',\n message: 'Payment could not be processed',\n reason: 'PAYMENT_DATA_INVALID'\n }\n });\n }\n _this.unblockUI();\n });\n }\n },\n {\n /**\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 */ key: \"onPaymentDataChanged\",\n value: function onPaymentDataChanged(intermediatePaymentData) {\n var _this = this;\n this.blockUI();\n return new Promise(function(resolve, reject) {\n try {\n var shippingAddress = intermediatePaymentData.shippingAddress;\n var shippingOptionData = intermediatePaymentData.shippingOptionData;\n var chosenShippingMethod = '';\n if (intermediatePaymentData.callbackTrigger == 'SHIPPING_OPTION') chosenShippingMethod = shippingOptionData.id;\n _this.getUpdatedTotals(shippingAddress, chosenShippingMethod, function(paymentDataRequestUpdate) {\n if (paymentDataRequestUpdate.newShippingOptionParameters.shippingOptions.length == 0) paymentDataRequestUpdate = {\n error: _this.getGoogleUnserviceableAddressError()\n };\n resolve(paymentDataRequestUpdate);\n });\n } catch (err) {\n _this.failPayment('Could not load updated totals or process payment data request update. ' + err);\n }\n _this.unblockUI();\n });\n }\n },\n {\n /**\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 */ key: \"getGoogleTransactionInfo\",\n value: function getGoogleTransactionInfo(resolve) {\n var _this = this;\n // get transaction info from cart\n var data = {\n action: \"wc_\".concat(this.gatewayID, \"_google_pay_get_transaction_info\")\n };\n if (this.productID) data.productID = this.productID;\n $.post(this.ajaxURL, data, function(response) {\n if (response.success) resolve(JSON.parse(response.data));\n else _this.failPayment('Could not build transaction info. ' + response.data.message);\n });\n }\n },\n {\n /**\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 */ key: \"getUpdatedTotals\",\n value: function getUpdatedTotals(shippingAddress, shippingMethod, resolve) {\n var _this = this;\n var data = {\n action: \"wc_\".concat(this.gatewayID, \"_google_pay_recalculate_totals\"),\n 'nonce': this.recalculateTotalsNonce,\n shippingAddress: shippingAddress,\n shippingMethod: shippingMethod\n };\n if (this.productID) data.productID = this.productID;\n $.post(this.ajaxURL, data, function(response) {\n if (response.success) resolve(JSON.parse(response.data));\n else _this.failPayment('Could not recalculate totals. ' + response.data.message);\n });\n }\n },\n {\n /**\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 */ key: \"getGoogleShippingAddressParameters\",\n value: function getGoogleShippingAddressParameters() {\n return {\n allowedCountryCodes: this.availableCountries\n };\n }\n },\n {\n /**\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 */ key: \"getGoogleUnserviceableAddressError\",\n value: function getGoogleUnserviceableAddressError() {\n return {\n reason: 'SHIPPING_ADDRESS_UNSERVICEABLE',\n message: 'Cannot ship to the selected address',\n intent: 'SHIPPING_ADDRESS'\n };\n }\n },\n {\n /**\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 */ key: \"addGooglePayButton\",\n value: function addGooglePayButton() {\n var _this = this;\n var paymentsClient = this.getGooglePaymentsClient();\n var button = paymentsClient.createButton({\n onClick: function(event) {\n return _this.onGooglePaymentButtonClicked(event);\n },\n buttonColor: this.buttonStyle,\n buttonSizeMode: 'fill'\n });\n document.getElementById('sv-wc-google-pay-button-container').appendChild(button);\n }\n },\n {\n /**\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 */ key: \"prefetchGooglePaymentData\",\n value: function prefetchGooglePaymentData() {\n var _this = this;\n this.getGooglePaymentDataRequest(function(paymentDataRequest) {\n // transactionInfo must be set but does not affect cache\n paymentDataRequest.transactionInfo = {\n totalPriceStatus: 'NOT_CURRENTLY_KNOWN',\n currencyCode: _this.currencyCode\n };\n var paymentsClient = _this.getGooglePaymentsClient();\n paymentsClient.prefetchPaymentData(paymentDataRequest);\n });\n }\n },\n {\n /**\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 */ key: \"processPayment\",\n value: function processPayment(paymentData, resolve) {\n var _this = this;\n // pass payment token to your gateway to process payment\n var data = {\n action: \"wc_\".concat(this.gatewayID, \"_google_pay_process_payment\"),\n nonce: this.processNonce,\n paymentData: JSON.stringify(paymentData)\n };\n if (this.productID && !this.needsShipping) data.productID = this.productID;\n return $.post(this.ajaxURL, data, function(response) {\n if (response.success) {\n resolve({\n transactionState: 'SUCCESS'\n });\n window.location = response.data.redirect;\n } else {\n resolve({\n transactionState: 'ERROR',\n error: {\n intent: 'SHIPPING_ADDRESS',\n message: 'Invalid data',\n reason: 'PAYMENT_DATA_INVALID'\n }\n });\n _this.failPayment('Payment could not be processed. ' + response.data.message);\n }\n });\n }\n },\n {\n /**\n\t\t * Show Google Pay payment sheet when Google Pay payment button is clicked\n\t\t */ key: \"onGooglePaymentButtonClicked\",\n value: function onGooglePaymentButtonClicked(event) {\n var _this = this;\n event.preventDefault();\n this.blockUI();\n this.getGooglePaymentDataRequest(function(paymentDataRequest) {\n var paymentsClient = _this.getGooglePaymentsClient();\n try {\n paymentsClient.loadPaymentData(paymentDataRequest);\n } catch (err) {\n _this.failPayment('Could not load payment data. ' + err);\n }\n _this.unblockUI();\n });\n }\n },\n {\n /**\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 */ key: \"init\",\n value: function init() {\n // initialize for the various pages\n if ($('form.cart').length) this.initProductPage();\n else if ($('form.woocommerce-cart-form').length) this.initCartPage();\n else if ($('form.woocommerce-checkout').length) this.initCheckoutPage();\n else return;\n this.initGooglePay();\n }\n },\n {\n /**\n\t\t * Initializes Google Pay.\n\t\t */ key: \"initGooglePay\",\n value: function initGooglePay() {\n var _this = this;\n var paymentsClient = this.getGooglePaymentsClient();\n paymentsClient.isReadyToPay(this.getGoogleIsReadyToPayRequest()).then(function(response) {\n if (response.result) {\n _this.addGooglePayButton();\n // prefetch payment data to improve performance\n _this.prefetchGooglePaymentData();\n }\n }).catch(function(err) {\n _this.failPayment('Google Pay is not ready. ' + err);\n });\n }\n },\n {\n /**\n\t\t * Initializes the product page.\n\t\t */ key: \"initProductPage\",\n value: function initProductPage() {\n this.uiElement = $('form.cart');\n }\n },\n {\n /**\n\t\t * Initializes the cart page.\n\t\t */ key: \"initCartPage\",\n value: function initCartPage() {\n var _this = this;\n this.uiElement = $('form.woocommerce-cart-form').parents('div.woocommerce');\n // re-init if the cart totals are updated\n $(document.body).on('updated_cart_totals', function() {\n _this.initGooglePay();\n });\n }\n },\n {\n /**\n\t\t * Initializes the checkout page.\n\t\t */ key: \"initCheckoutPage\",\n value: function initCheckoutPage() {\n this.uiElement = $('form.woocommerce-checkout');\n }\n },\n {\n /**\n\t\t * Fails the purchase based on the gateway result.\n\t\t */ key: \"failPayment\",\n value: function failPayment(error) {\n console.error('[Google Pay] ' + error);\n this.unblockUI();\n this.renderErrors([\n this.genericError\n ]);\n }\n },\n {\n /**\n\t\t * Renders any new errors and bring them into the viewport.\n \t\t */ key: \"renderErrors\",\n value: function renderErrors(errors) {\n // hide and remove any previous errors\n $('.woocommerce-error, .woocommerce-message').remove();\n // add errors\n this.uiElement.prepend('
    • ' + errors.join('
    • ') + '
    ');\n // unblock UI\n this.uiElement.removeClass('processing').unblock();\n // scroll to top\n $('html, body').animate({\n scrollTop: this.uiElement.offset().top - 100\n }, 1000);\n }\n },\n {\n /**\n\t\t * Blocks the payment form UI.\n\t\t */ key: \"blockUI\",\n value: function blockUI() {\n this.uiElement.block({\n message: null,\n overlayCSS: {\n background: '#fff',\n opacity: 0.6\n }\n });\n }\n },\n {\n /**\n\t\t * Unblocks the payment form UI.\n\t\t */ key: \"unblockUI\",\n value: function unblockUI() {\n this.uiElement.unblock();\n }\n }\n ]);\n return SV_WC_Google_Pay_Handler_v5_15_7;\n }();\n $(document.body).trigger('sv_wc_google_pay_handler_v5_15_7_loaded');\n});\n\n\n//# sourceMappingURL=sv-wc-payment-gateway-google-pay.js.map\n","function _class_call_check(instance, Constructor) {\n if (!(instance instanceof Constructor)) throw new TypeError(\"Cannot call a class as a function\");\n}\nexport { _class_call_check as _ };\n","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n\n if (\"value\" in descriptor) descriptor.writable = true;\n\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _create_class(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n\n return Constructor;\n}\nexport { _create_class as _ };\n","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_15_7} object\n\t */\n\twindow.SV_WC_Google_Pay_Handler_v5_15_7 = class SV_WC_Google_Pay_Handler_v5_15_7 {\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.gateway_merchant_id The gateway merchant ID\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\tgateway_merchant_id,\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.gatewayMerchantID = gateway_merchant_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.gatewayMerchantID\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_15_7_loaded' );\n\n} );\n"],"names":["$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","$parcel$global","globalThis","self","window","global","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","parcelRegister","$c0249d4a3fc9bb83$export$71511d61b312f219","instance","Constructor","TypeError","$690246f0b6925227$var$_defineProperties","target","props","i","length","descriptor","writable","key","$690246f0b6925227$export$71511d61b312f219","protoProps","staticProps","prototype","$guLUH","$90XvN","jQuery","$","SV_WC_Google_Pay_Handler_v5_15_7","params","_","plugin_id","merchant_id","merchant_name","gateway_id","gateway_merchant_id","gateway_id_dasherized","environment","ajax_url","recalculate_totals_nonce","process_nonce","button_style","card_types","available_countries","currency_code","needs_shipping","generic_error","gatewayID","gatewayMerchantID","merchantID","merchantName","ajaxURL","recalculateTotalsNonce","processNonce","buttonStyle","availableCountries","currencyCode","needsShipping","genericError","product_id","productID","baseRequest","apiVersion","apiVersionMinor","tokenizationSpecification","type","parameters","baseCardPaymentMethod","allowedAuthMethods","allowedCardNetworks","billingAddressRequired","billingAddressParameters","format","phoneNumberRequired","cardPaymentMethod","assign","paymentsClient","value","allowedPaymentMethods","resolve","_this","getGoogleTransactionInfo","transactionInfo","paymentDataRequest","merchantInfo","merchantId","emailRequired","callbackIntents","shippingAddressRequired","shippingAddressParameters","getGoogleShippingAddressParameters","shippingOptionRequired","args","paymentDataCallbacks","onPaymentAuthorized","paymentData","onPaymentDataChanged","google","payments","api","PaymentsClient","blockUI","Promise","reject","processPayment","transactionState","error","intent","message","reason","unblockUI","intermediatePaymentData","shippingAddress","shippingOptionData","chosenShippingMethod","callbackTrigger","getUpdatedTotals","paymentDataRequestUpdate","newShippingOptionParameters","shippingOptions","getGoogleUnserviceableAddressError","failPayment","data","action","concat","post","response","success","JSON","parse","shippingMethod","allowedCountryCodes","button","getGooglePaymentsClient","createButton","onClick","event","onGooglePaymentButtonClicked","buttonColor","buttonSizeMode","document","getElementById","appendChild","getGooglePaymentDataRequest","totalPriceStatus","prefetchPaymentData","nonce","stringify","location","redirect","preventDefault","loadPaymentData","initProductPage","initCartPage","initCheckoutPage","initGooglePay","isReadyToPay","getGoogleIsReadyToPayRequest","then","result","addGooglePayButton","prefetchGooglePaymentData","catch","uiElement","parents","body","on","console","renderErrors","errors","remove","prepend","join","removeClass","unblock","animate","scrollTop","offset","top","block","overlayCSS","background","opacity","trigger"],"version":3,"file":"sv-wc-payment-gateway-google-pay.js.map","sourceRoot":"../../../../../"} \ No newline at end of file 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 6b84db063..3bcccb346 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_15_5 + class window.SV_WC_Apple_Pay_Handler_v5_15_7 # Constructs the handler. @@ -440,4 +440,4 @@ jQuery ( $ ) -> # dispatch loaded event - $( document.body ).trigger( 'sv_wc_apple_pay_handler_v5_15_5_loaded' ) + $( document.body ).trigger( 'sv_wc_apple_pay_handler_v5_15_7_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 7ae415fbe..9b63d4fff 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_15_6} object + * @type {SV_WC_Google_Pay_Handler_v5_15_7} object */ - window.SV_WC_Google_Pay_Handler_v5_15_6 = class SV_WC_Google_Pay_Handler_v5_15_6 { + window.SV_WC_Google_Pay_Handler_v5_15_7 = class SV_WC_Google_Pay_Handler_v5_15_7 { /** * Handler constructor. @@ -612,6 +612,6 @@ jQuery( function( $ ) { } } - $( document.body ).trigger( 'sv_wc_google_pay_handler_v5_15_6_loaded' ); + $( document.body ).trigger( 'sv_wc_google_pay_handler_v5_15_7_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 adedfc989..ce53a487b 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_15_5 + class window.SV_WC_Payment_Methods_Handler_v5_15_7 # Constructs the class. @@ -270,4 +270,4 @@ jQuery ( $ ) -> # dispatch loaded event - $( document.body ).trigger( 'sv_wc_payment_methods_handler_v5_15_5_loaded' ) + $( document.body ).trigger( 'sv_wc_payment_methods_handler_v5_15_7_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 5a488eea8..d1452126e 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_15_5 + class window.SV_WC_Payment_Form_Handler_v5_15_7 # 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_15_5 instance + # Returns SV_WC_Payment_Form_Handler_v5_15_7 instance constructor: (args) -> @id = args.id @@ -385,4 +385,4 @@ jQuery ( $ ) -> # dispatch loaded event - $( document.body ).trigger( "sv_wc_payment_form_handler_v5_15_5_loaded" ) + $( document.body ).trigger( "sv_wc_payment_form_handler_v5_15_7_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 39f40d6fc..d40ecf285 100644 --- a/woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php +++ b/woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\Blocks\Blocks_Handler; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\Blocks\Blocks_Handler; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Payment_Gateway_Direct' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 ffbe458ab..54a8d0a02 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Payment_Gateway_Helper' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 22290d9fc..42099dee2 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Payment_Gateway_Hosted' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 069b3096d..74c4ea8f0 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Payment_Gateway_My_Payment_Methods' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\SV_WC_Payment_Gateway_My_Payment_Methods' ) ) : /** @@ -174,9 +174,9 @@ public function maybe_enqueue_styles_scripts() { wp_register_script( 'jquery-tiptip', WC()->plugin_url() . '/assets/js/jquery-tiptip/jquery.tipTip.min.js', [ 'jquery' ], $wc_version ); - wp_enqueue_style( "$handle-v5_15_6", $this->get_plugin()->get_payment_gateway_framework_assets_url() . '/css/frontend/' . $handle . '.min.css', [ 'dashicons' ], $fw_version ); + wp_enqueue_style( "$handle-v5_15_7", $this->get_plugin()->get_payment_gateway_framework_assets_url() . '/css/frontend/' . $handle . '.min.css', [ 'dashicons' ], $fw_version ); - wp_enqueue_script( "$handle-v5_15_6", $this->get_plugin()->get_payment_gateway_framework_assets_url() . '/dist/frontend/' . $handle . '.js', [ 'jquery-tiptip', 'jquery' ], $fw_version ); + wp_enqueue_script( "$handle-v5_15_7", $this->get_plugin()->get_payment_gateway_framework_assets_url() . '/dist/frontend/' . $handle . '.js', [ 'jquery-tiptip', 'jquery' ], $fw_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 eeabc9361..f854c09b9 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,15 +22,15 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ -namespace SkyVerge\WooCommerce\PluginFramework\v5_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\Blocks\Blocks_Handler; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\Enums\PaymentFormContext; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\Payment_Gateway\Blocks\Gateway_Checkout_Block_Integration; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\Blocks\Blocks_Handler; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\Enums\PaymentFormContext; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\Payment_Gateway\Blocks\Gateway_Checkout_Block_Integration; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Payment_Gateway_Payment_Form' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\SV_WC_Payment_Gateway_Payment_Form' ) ) : /** @@ -1180,7 +1180,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_15_6\SV_WC_Payment_Gateway_Helper', 'normalize_card_type' ], $card_types ); + $args['enabled_card_types'] = array_map( [ 'SkyVerge\WooCommerce\PluginFramework\v5_15_7\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 f15dc864b..d6109019b 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; use Automattic\WooCommerce\Admin\Notes\WC_Admin_Note; use Automattic\WooCommerce\Admin\Notes\WC_Admin_Notes; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\Payment_Gateway\Blocks\Gateway_Blocks_Handler; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\Payment_Gateway\External_Checkout\Google_Pay\Google_Pay; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\Payment_Gateway\Blocks\Gateway_Blocks_Handler; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\Payment_Gateway\External_Checkout\Google_Pay\Google_Pay; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Payment_Gateway_Plugin' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 83a27ed8d..617c8376c 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Payment_Gateway_Privacy' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 e8e79e380..92d9ee33b 100755 --- a/woocommerce/payment-gateway/class-sv-wc-payment-gateway.php +++ b/woocommerce/payment-gateway/class-sv-wc-payment-gateway.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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; use Automattic\WooCommerce\Blocks\Integrations\IntegrationInterface; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\Blocks\Blocks_Handler; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\Payment_Gateway\Blocks\Gateway_Checkout_Block_Integration; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\Blocks\Blocks_Handler; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\Payment_Gateway\Blocks\Gateway_Checkout_Block_Integration; use stdClass; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Payment_Gateway' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\SV_WC_Payment_Gateway' ) ) : /** @@ -473,7 +473,7 @@ protected function enqueue_payment_form_assets() { } $handle = 'sv-wc-payment-gateway-payment-form'; - $versioned_handle = $handle . '-v5_15_6'; + $versioned_handle = $handle . '-v5_15_7'; // 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 1bd70a808..6c68ebf79 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Payment_Gateway_Exception' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 ddc29ddae..6b819d99e 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Payment_Gateway_Integration' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 ef2d65bbf..a934886c1 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Payment_Gateway_Integration_Pre_Orders' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 582760178..b8e8386b8 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Payment_Gateway_Integration_Subscriptions' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\SV_WC_Payment_Gateway_Integration_Subscriptions' ) ) : /** 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 1e8c6e8ce..eb33a36b7 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Payment_Gateway_Payment_Token' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 1dac1ec4a..4fbdd6d13 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WC_Payment_Gateway_Payment_Tokens_Handler' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 43ccb09f7..371cc15a2 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_15_6\Payment_Gateway; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7\Payment_Gateway; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\REST_API as Plugin_REST_API; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\REST_API as Plugin_REST_API; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\Payment_Gateway\\REST_API' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\Payment_Gateway\\REST_API' ) ) : /** * The payment gateway plugin REST API handler class. * - * @see \SkyVerge\WooCommerce\PluginFramework\v5_15_6\REST_API + * @see \SkyVerge\WooCommerce\PluginFramework\v5_15_7\REST_API * * @since 5.2.0 */ @@ -47,7 +47,7 @@ class REST_API extends Plugin_REST_API { * * Plugins can override this to add their own data. * - * @see \SkyVerge\WooCommerce\PluginFramework\v5_15_6\REST_API::get_system_status_data() + * @see \SkyVerge\WooCommerce\PluginFramework\v5_15_7\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 23a124a2d..6df438b02 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_15_6\REST_API\Controllers; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7\REST_API\Controllers; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\Settings_API\Abstract_Settings; -use SkyVerge\WooCommerce\PluginFramework\v5_15_6\Settings_API\Setting; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\Settings_API\Abstract_Settings; +use SkyVerge\WooCommerce\PluginFramework\v5_15_7\Settings_API\Setting; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\REST_API\\Controllers\\Settings' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 4c05276bd..1d44acb3f 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\REST_API' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\REST_API' ) ) : /** diff --git a/woocommerce/utilities/class-sv-wp-async-request.php b/woocommerce/utilities/class-sv-wp-async-request.php index 6bd911449..c51d0a7df 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WP_Async_Request' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 fa93a6ae1..c580cfdaa 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_15_6; +namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; -if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WP_Background_Job_Handler' ) ) : +if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\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 8adb93571..b783d3d52 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_15_6; + namespace SkyVerge\WooCommerce\PluginFramework\v5_15_7; defined( 'ABSPATH' ) or exit; - if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_6\\SV_WP_Job_Batch_Handler' ) ) : + if ( ! class_exists( '\\SkyVerge\\WooCommerce\\PluginFramework\\v5_15_7\\SV_WP_Job_Batch_Handler' ) ) : /**