Skip to content

Release/2.5.3 #300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
15 changes: 10 additions & 5 deletions includes/admin/class-wc-amazon-payments-advanced-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="%1$s">configuration</a>. to make sure everything is set correctly.', 'woocommerce-gateway-amazon-payments-advanced' ),
__( 'Amazon Pay is now enabled for WooCommerce. Please check the <a href="%1$s">configuration</a>. 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,
Expand Down Expand Up @@ -332,15 +332,20 @@ 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.
// We do this here, so its on admin side but not dependant on user visiting the plugin's settings.
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 );
}

Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -344,6 +344,10 @@ public function get_form_fields() {
}

$this->form_fields = array(
'plugin_onboarding' => array(
'type' => 'custom',
'html' => '<p>' . __( 'Need help? Check out our <a href="https://woocommerce.com/document/amazon-payments-advanced/" target="_blank">User Documentation</a> for detailed guidance.', 'woocommerce-gateway-amazon-payments-advanced' ) . '</p>',
),
'important_note' => array(
'title' => __( 'Important note, before you sign up:', 'woocommerce-gateway-amazon-payments-advanced' ),
'type' => 'title',
Expand Down Expand Up @@ -389,7 +393,7 @@ public function get_form_fields() {
),
'manual_notice' => array(
'type' => 'custom',
'html' => '<p>Problems with automatic setup? <a href="#" class="wcapa-toggle-section" data-toggle="#manual-settings-container, #automatic-settings-container">Click here</a> to manually enter your keys.</p>',
'html' => '<p>Problems with automatic setup? Toggle here <a href="#" class="wcapa-toggle-section" data-toggle="#manual-settings-container, #automatic-settings-container"><span class="woocommerce-input-toggle woocommerce-input-toggle--disabled" aria-label="' . esc_attr( __( 'Manually enter your keys', 'woocommerce-gateway-amazon-payments-advanced' ) ) . '">' . esc_attr__( 'Yes', 'woocommerce' ) . '</span></a> to manually enter your keys.</p>',
),
'manual_container_start' => array(
'type' => 'custom',
Expand Down
13 changes: 12 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions src/js/non-block/amazon-wc-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 5 additions & 0 deletions src/sass/style-admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@
.json_key_valid {
border: 1px solid #18ff59;
}

.wcapa-toggle-section:focus {
outline: 0;
box-shadow: none
}
8 changes: 4 additions & 4 deletions woocommerce-gateway-amazon-payments-advanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading