diff --git a/changelog.txt b/changelog.txt index 46c5a8d5..6c11e3d3 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,16 @@ *** Amazon Pay Changelog *** += 2.5.3 - 2024-xx-xx = + +* Fix - Add onboarding text and link +* Fix - Update the plugin Author on wp.org +* Fix - Set Merchant account details selector as toggle +* Fix - Adjust the feedback prompt trigger moment +* Fix - Adjust the plugin description on the WC settings page +* Fix - Check the configuration link removed from actual page +* Dev - Bumped tested up to WordPress v6.6.2. +* Dev - Bumped tested up to WooCommerce v9.3.2. + = 2.5.2 - 2024-07-25 = * Fix - Error when using a non Standard decimal amount for a currency. diff --git a/includes/admin/class-wc-amazon-payments-advanced-admin.php b/includes/admin/class-wc-amazon-payments-advanced-admin.php index e954141a..77a658a9 100644 --- a/includes/admin/class-wc-amazon-payments-advanced-admin.php +++ b/includes/admin/class-wc-amazon-payments-advanced-admin.php @@ -180,13 +180,13 @@ protected function get_admin_notices() { ); } - if ( ! WC_Amazon_Payments_Advanced_API::get_amazon_keys_set() && 'yes' === $this->settings['enabled'] ) { + if ( ! WC_Amazon_Payments_Advanced_API::get_amazon_keys_set() && 'yes' === $this->settings['enabled'] && $current_section !== 'amazon_payments_advanced' ) { $notices[] = array( 'dismiss_action' => 'amazon_pay_dismiss_enable_notice', 'class' => 'amazon-pay-enable-notice', 'text' => sprintf( // translators: 1) The URL to the Amazon Pay settings screen. - __( 'Amazon Pay is now enabled for WooCommerce and ready to accept live payments. Please check the configuration. to make sure everything is set correctly.', 'woocommerce-gateway-amazon-payments-advanced' ), + __( 'Amazon Pay is now enabled for WooCommerce. Please check the configuration. to make sure everything is set correctly to accept live payments.', 'woocommerce-gateway-amazon-payments-advanced' ), esc_url( $this->get_settings_url() ) ), 'is_dismissable' => true, @@ -332,7 +332,12 @@ public function admin_notices() { public function review_prompt() { global $current_section; - $anniversary_date = get_option( 'amazon_payments_advanced_anniversary_date' ); + // Bail early and always if we don't have the keys set. + if ( ! WC_Amazon_Payments_Advanced_API::get_amazon_keys_set() ) { + return; + } + + $anniversary_date = get_option( 'amazon_payments_advanced_enabled_anniversary_date' ); $hidden_until_date = get_option( 'amazon_payments_advanced_hidden_until_date' ); // Set up the dates. @@ -340,7 +345,7 @@ public function review_prompt() { if ( ! $anniversary_date || ! $hidden_until_date ) { $anniversary_date = time(); $hidden_until_date = strtotime( '+1 month' ); - update_option( 'amazon_payments_advanced_anniversary_date', $anniversary_date ); + update_option( 'amazon_payments_advanced_enabled_anniversary_date', $anniversary_date ); update_option( 'amazon_payments_advanced_hidden_until_date', $hidden_until_date ); } @@ -407,7 +412,7 @@ public function review_prompt() { public function ajax_dismiss_review_prompt() { check_ajax_referer( 'amazon_pay_dismiss_review_prompt', 'nonce' ); - $anniversary_date = get_option( 'amazon_payments_advanced_anniversary_date' ); + $anniversary_date = get_option( 'amazon_payments_advanced_enabled_anniversary_date' ); // Start from the stored anniversary date. // Add a year in each loop until the result is in the future. diff --git a/includes/class-wc-gateway-amazon-payments-advanced-abstract.php b/includes/class-wc-gateway-amazon-payments-advanced-abstract.php index e6e0e4e6..1424b801 100644 --- a/includes/class-wc-gateway-amazon-payments-advanced-abstract.php +++ b/includes/class-wc-gateway-amazon-payments-advanced-abstract.php @@ -177,7 +177,7 @@ abstract class WC_Gateway_Amazon_Payments_Advanced_Abstract extends WC_Payment_G */ public function __construct() { $this->method_title = __( 'Amazon Pay', 'woocommerce-gateway-amazon-payments-advanced' ); - $this->method_description = __( 'Amazon Pay is embedded directly into your existing web site, and all the buyer interactions with Amazon Pay and Login with Amazon take place in embedded widgets so that the buyer never leaves your site. Buyers can log in using their Amazon account, select a shipping address and payment method, and then confirm their order. Requires an Amazon Pay seller account and supports USA, UK, Germany, France, Italy, Spain, Luxembourg, the Netherlands, Sweden, Portugal, Hungary, Denmark, and Japan.', 'woocommerce-gateway-amazon-payments-advanced' ); + $this->method_description = __( 'Amazon Pay allows 300M+ active buyers to checkout using their Amazon account and is embedded directly into your existing website.', 'woocommerce-gateway-amazon-payments-advanced' ); $this->id = 'amazon_payments_advanced'; $this->icon = apply_filters( 'woocommerce_amazon_pa_logo', wc_apa()->plugin_url . '/build/images/amazon-payments.png' ); $this->view_transaction_url = $this->get_transaction_url_format(); @@ -344,6 +344,10 @@ public function get_form_fields() { } $this->form_fields = array( + 'plugin_onboarding' => array( + 'type' => 'custom', + 'html' => '

' . __( 'Need help? Check out our User Documentation for detailed guidance.', 'woocommerce-gateway-amazon-payments-advanced' ) . '

', + ), 'important_note' => array( 'title' => __( 'Important note, before you sign up:', 'woocommerce-gateway-amazon-payments-advanced' ), 'type' => 'title', @@ -389,7 +393,7 @@ public function get_form_fields() { ), 'manual_notice' => array( 'type' => 'custom', - 'html' => '

Problems with automatic setup? Click here to manually enter your keys.

', + 'html' => '

Problems with automatic setup? Toggle here ' . esc_attr__( 'Yes', 'woocommerce' ) . ' to manually enter your keys.

', ), 'manual_container_start' => array( 'type' => 'custom', diff --git a/readme.txt b/readme.txt index 195e855c..28f19f04 100644 --- a/readme.txt +++ b/readme.txt @@ -2,7 +2,7 @@ Contributors: woocommerce, automattic, saucal, woothemes, akeda, jeffstieler, mikejolley, bor0, claudiosanches, royho, jamesrrodger, laurendavissmith001, dwainm, danreylop Tags: woocommerce, amazon, checkout, payments, e-commerce, ecommerce Requires at least: 5.5 -Tested up to: 6.2 +Tested up to: 6.2.2 Stable tag: 2.5.2 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -80,6 +80,17 @@ Automatic updates should work like a charm; as always though, ensure you backup == Changelog == += 2.5.3 - 2024-xx-xx = + +* Fix - Add onboarding text and link +* Fix - Update the plugin Author on wp.org +* Fix - Set Merchant account details selector as toggle +* Fix - Adjust the feedback prompt trigger moment +* Fix - Adjust the plugin description on the WC settings page +* Fix - Check the configuration link removed from actual page +* Dev - Bumped tested up to WordPress v6.6.2. +* Dev - Bumped tested up to WooCommerce v9.3.2. + = 2.5.2 - 2024-07-25 = * Fix - Error when using a non Standard decimal amount for a currency. diff --git a/src/js/non-block/amazon-wc-admin.js b/src/js/non-block/amazon-wc-admin.js index 3c558048..30f1338a 100644 --- a/src/js/non-block/amazon-wc-admin.js +++ b/src/js/non-block/amazon-wc-admin.js @@ -351,6 +351,7 @@ toggle_visibility: function( e ) { e.preventDefault(); var target = $( $( this ).data( 'toggle' ) ); + $(this).find( 'span' ).toggleClass( 'woocommerce-input-toggle--disabled', 'woocommerce-input-toggle--enabled' ); target.toggleClass( 'hidden' ); if ( ! $( this ).hasClass( 'wcapa-toggle-scroll' ) ) { return; diff --git a/src/sass/style-admin.scss b/src/sass/style-admin.scss index ea9cf936..92c8f964 100644 --- a/src/sass/style-admin.scss +++ b/src/sass/style-admin.scss @@ -5,3 +5,8 @@ .json_key_valid { border: 1px solid #18ff59; } + +.wcapa-toggle-section:focus { + outline: 0; + box-shadow: none +} diff --git a/woocommerce-gateway-amazon-payments-advanced.php b/woocommerce-gateway-amazon-payments-advanced.php index d2d50f48..b144eb90 100644 --- a/woocommerce-gateway-amazon-payments-advanced.php +++ b/woocommerce-gateway-amazon-payments-advanced.php @@ -4,12 +4,12 @@ * Plugin URI: https://woocommerce.com/products/pay-with-amazon/ * Description: Amazon Pay is embedded directly into your existing web site, and all the buyer interactions with Amazon Pay and Login with Amazon take place in embedded widgets so that the buyer never leaves your site. Buyers can log in using their Amazon account, select a shipping address and payment method, and then confirm their order. Requires an Amazon Pay seller account and supports USA, UK, Germany, France, Italy, Spain, Luxembourg, the Netherlands, Sweden, Portugal, Hungary, Denmark, and Japan. * Version: 2.5.2 - * Author: WooCommerce - * Author URI: https://woocommerce.com + * Author: Amazon Pay + * Author URI: https://pay.amazon.com/ * Text Domain: woocommerce-gateway-amazon-payments-advanced * Domain Path: /languages/ - * Tested up to: 6.6 - * WC tested up to: 9.0.2 + * Tested up to: 6.6.2 + * WC tested up to: 9.3.2 * WC requires at least: 4.0 * * Copyright: © 2024 WooCommerce