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
Fetch & display marketplace promotions #44840
Conversation
Hi @andfinally, Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
Test Results SummaryCommit SHA: 223d945
To view the full API test report, click here. To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
plugins/woocommerce-admin/client/marketplace/components/promotions/promotions.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks great, thanks for the changes! 💯
* Fetch & display marketplace promotions * add changelog entry * Pass promos via inline JS, demove unused JS file, rely on transient only * Return early if not on expected page * Compare dates in UTC * remove unused global userLocale * Small tweaks. * TypeScript linter errors. * fix TS lint --------- Co-authored-by: Remi Corson <1649788+corsonr@users.noreply.github.com> Co-authored-by: And Finally <andfinally@users.noreply.github.com>
Submission Review Guidelines:
Changes proposed in this Pull Request:
Related: https://github.com/Automattic/woocommerce.com/issues/19573
Related: #44655
We want to display the promos fetched from #44655 within the WC Admin UI. That's what this PR addresses.
<Promotions>
component which aims to get the promos from the local cache (wc_addons_marketplace_promotions
) but provides a fallback to call the endpointWC_marketplace_promotions
variable to make it accessible by the component<Content>
component to load the promosPromos are
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
nvm use
cd plugins/woocommerce
pnpm -- wp-env start
pnpm --filter='@woocommerce/plugin-woocommerce' build
Changelog entry
Significance
Type
Message
Comment