-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow plugin slugs and store slugs to diverge (#65294)
hasMarketplaceProduct is sometimes called with product slugs and sometimes called with store product slugs. In both cases they are compared to the keys in the productList in the redux state, which are store product slugs. A product slug looks like: woocommerce-product-csv-import-suite A store product slug looks like: wc_product_csv_import_suite_yearly This change follows the approach proposed in pdh6GB-Pq-p2#comment-1538. Specifically, it always compares against the billing_product_slug and against the store product slug, removing the need to normalise slugs before comparing. A unit test has been added to support this, and one unit test removed. The removed test wasn't a valid test case - it was supplying an artificial slug which would never be supplied in normal circumstances, not matching either kind of slug. This fixes part of 634-gh-Automattic/dotcom-manage
- Loading branch information
Showing
2 changed files
with
51 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters