Skip to content

Commit

Permalink
Merge pull request #21937 from Yoast/379-missing-upsell-ads-for-woo-s…
Browse files Browse the repository at this point in the history
…eo-when-on-rtl-locale

Check for product by slug
  • Loading branch information
leonidasmi authored Jan 2, 2025
2 parents 01c6afd + d1d6590 commit a3f73f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/js/src/redux/reducers/editorContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ function getDefaultState() {
termType: get( window, "wpseoScriptData.termType", "" ),
postStatus: get( window, "wpseoScriptData.postStatus", "" ),
isFrontPage: get( window, "wpseoScriptData.isFrontPage", "0" ) === "1",
postType: get( window, "wpseoScriptData.postType", "" ),
};
}

Expand Down
2 changes: 1 addition & 1 deletion packages/js/src/redux/selectors/editorContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function getPostOrPageString( state ) {
* @returns {boolean} Whether you're editing a product.
*/
export function getIsProduct( state ) {
return get( state, "editorContext.postTypeNameSingular" ) === "Product";
return get( state, "editorContext.postType" ) === "product";
}

/**
Expand Down

0 comments on commit a3f73f7

Please sign in to comment.