Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Revert (#6166) (#6253)
Browse files Browse the repository at this point in the history
Revert "Prevent Featured Product block from breaking when product is out of stock + hidden
from catalog (#6166)"

This reverts commit 3c0e0af
  • Loading branch information
tarhi-saad authored Apr 14, 2022
1 parent a36c19d commit 908526e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion assets/js/editor-components/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const getProductsRequests = ( {
const defaultArgs = {
per_page: isLargeCatalog ? 100 : 0,
catalog_visibility: 'any',
stock_status: [ 'instock', 'outofstock', 'onbackorder' ],
search,
orderby: 'title',
order: 'asc',
Expand Down
3 changes: 1 addition & 2 deletions assets/js/hocs/with-product-variations.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const withProductVariations = createHigherOrderComponent(
p.variations &&
p.variations.find( ( { id } ) => id === variationId )
);
return parentProduct[ 0 ]?.id;
return parentProduct[ 0 ].id;
}

getExpandedProduct() {
Expand Down Expand Up @@ -186,7 +186,6 @@ const withProductVariations = createHigherOrderComponent(
showVariations: false,
};
}

return WrappedComponent;
},
'withProductVariations'
Expand Down

0 comments on commit 908526e

Please sign in to comment.