This repository was archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 218
This repository was archived by the owner on Feb 23, 2024. It is now read-only.
Fix potential regression in no products placeholder for All Products block #3158
Copy link
Copy link
Closed
Labels
block: all productsIssues related to the all products block.Issues related to the all products block.priority: lowThe issue/PR is low priority—not many people are affected or there’s a workaround, etc.The issue/PR is low priority—not many people are affected or there’s a workaround, etc.status: staleStale issues and PRs have had no updates for 60 days.Stale issues and PRs have had no updates for 60 days.type: bugThe issue/PR concerns a confirmed bug.The issue/PR concerns a confirmed bug.
Description
In the testing notes for the 3.2.0
release are the following instructions:
Broken link for "No Products" placeholder
- In a store with no products (move them to trash).
- Create a new page and add the All Products block.
- Click on the Add new product link and verify it works.
These instructions look like they are intended to align with the fix implemented in #2961. However, in the current state of the plugin, the following is displayed given the above conditions for the All Products block:
This may not be a regression, but rather an expectation issue here because:
- when I trash all the products on my site,
HAS_PRODUCTS
is stilltrue
. ShouldHAS_PRODUCTS
only be considering published products (which would be the bug here). - If
HAS_PRODUCTS
should include trashed products, we should maybe either clarify this constant name to something likeHAS_ANY_PRODUCTS
OR introduce a new constantHAS_PUBLISHED_PRODUCTS
. Then I think we'll want to make sure that the conditional here is only considering published products.
It looks like in this case the testing notes described the expectation correctly, but the actual code implemented will not result in the testing instructions showing the expected results.
Metadata
Metadata
Assignees
Labels
block: all productsIssues related to the all products block.Issues related to the all products block.priority: lowThe issue/PR is low priority—not many people are affected or there’s a workaround, etc.The issue/PR is low priority—not many people are affected or there’s a workaround, etc.status: staleStale issues and PRs have had no updates for 60 days.Stale issues and PRs have had no updates for 60 days.type: bugThe issue/PR concerns a confirmed bug.The issue/PR concerns a confirmed bug.