saucal / woocommerce-gateway-amazon-pay

Amazon Pay Gateway
0 stars 1 forks source link

Reviews prompt #195

Closed dpanta94 closed 1 year ago

dpanta94 commented 1 year ago

All Submissions:

Changes proposed in this Pull Request:

In the plugin's setting page a review prompt is being added. The prompt has 3 links. 1) To the review page 2) To dismiss the prompt 3) To the support page

When this feature is released, the plugin will store 2 dates in the DB on the first admin request. The date of the installation/activation/update of the plugin including this feature (anniversary date). The date of the anniversary date + 1 month in the future (hidden_until_date).

When the actual date becomes > than the hidden until date, the review prompt will appear in the plugin's settings page. When the user clicks the dismiss link of the prompt, the prompt will remain hidden until the next anniversary date arrives.

Option keys: amazon_payments_advanced_anniversary_date amazon_payments_advanced_hidden_until_date

How to test the changes in this Pull Request:

  1. The review prompt appears 1 month after installing a version including this feature. You can change the stored options in order to not have to wait.
  2. The links 1) and 3) open on a new tab and point to the expected URLs.
  3. Clicking the dismiss button will update the hidden_until_date option correctly and will hide the prompt until then.

Other information:

Changelog entry

Add - Review Prompt