Skip to content
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

Show a notice on the landing page if this extension does not support their store country #256

Merged
merged 3 commits into from Nov 18, 2021

Conversation

eason9487
Copy link
Member

@eason9487 eason9487 commented Nov 15, 2021

Closes #251

Changes proposed in this pull request

  • Expose store country and whether it's supported by Pinterest Ads to client-side via inline JavaScript.
  • Implement an unsupported country warning with <Notice> component and show it on the landing page when store country is not supported.

Additional notes

⚠️ Currently the extension is based on “store location” based on WP Admin > WooCommerce > Settings > General location information.

  • 💡 Before merging we'll confirm if the notice content is approved cc @shivanarrthine

Screenshots

image

Detailed test instructions

  1. Go to the General tab of WC Settings. Change the "Country / State" option to one of the unsupported countries.
  2. Go to the landing page: /wp-admin/admin.php?page=wc-admin&path=%2Fpinterest%2Flanding
  3. It should show an unsupported notice at the page top.
    • Click on the "Change your store’s country here", it should bring you to WC Settings.
    • Click on the "Read more about supported countries", it should open a new tab to Pinterest's help page.

Changelog entry

Add - Show a notice on the landing page if this extension does not support their store country.

@eason9487 eason9487 requested a review from a team November 15, 2021 02:58
@eason9487 eason9487 self-assigned this Nov 15, 2021
@eason9487
Copy link
Member Author

📝
I tried to get the ads availability list from Pinterest API, but the API requires the read_pin_promotions permission first. In addition, the read_pin_promotions permission is not currently asked by this extension, and the landing page does not yet require authorization, so it seems unable to use the API in our use case.

@jconroy
Copy link
Member

jconroy commented Nov 15, 2021

so it seems unable to use the API in our use case.

Perfect, thanks for the investigation @eason9487

Copy link
Contributor

@ianlin ianlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in local and it worked perfectly!

@shivanarrthine
Copy link
Collaborator

Before merging we'll confirm if the notice content is approved

Confirming that the notice content is approved. @eason9487

@eason9487 eason9487 merged commit c4054c8 into develop Nov 18, 2021
@eason9487 eason9487 deleted the feature/251-unsupported-country branch November 18, 2021 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warn merchants if extension does not support their country (v1 pre-multi feed support)
4 participants