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

Can't add the Products block in WP 5.9 #8069

Closed
Tracked by #42616
Aljullu opened this issue Jan 2, 2023 · 3 comments · Fixed by #8082
Closed
Tracked by #42616

Can't add the Products block in WP 5.9 #8069

Aljullu opened this issue Jan 2, 2023 · 3 comments · Fixed by #8082
Labels
block-type: product-query Issues related to/affecting all product-query variations. type: bug The issue/PR concerns a confirmed bug.

Comments

@Aljullu
Copy link
Contributor

Aljullu commented Jan 2, 2023

To reproduce

  1. With WordPress 5.9 and WooCommerce core 7.3 beta 2, create a post or page.
  2. Try to add the Products (Beta) block.
  3. Notice the block can't be added and there is an error in the console.

Expected behavior

Either we:

  1. Hide the Products block on WordPress 5.9.
  2. Find a way to add the Products block without the need of core/query-no-results, which seems to be the problematic inner block.

I lean towards approach 1 because it's simpler and I think it's safe to assume most stores using a block theme keep WordPress up to date. But if we can find a way to implement approach 2, I think it's also ok.

Screenshots

imatge

@Aljullu Aljullu added the type: bug The issue/PR concerns a confirmed bug. label Jan 2, 2023
@Aljullu
Copy link
Contributor Author

Aljullu commented Jan 2, 2023

@sunyatasattva do you think we should prioritize this? It would be good to get it fixed in WP 7.3 so we don't expose the Products block in stores which can't insert it.

@sunyatasattva
Copy link
Contributor

Thanks for finding this out @Aljullu ! Do you know what happens if you add the normal Query Loop block on WP 5.9? And yea, I think it would be good to prioritize this.

@sunyatasattva sunyatasattva added the block-type: product-query Issues related to/affecting all product-query variations. label Jan 2, 2023
@Aljullu
Copy link
Contributor Author

Aljullu commented Jan 3, 2023

Do you know what happens if you add the normal Query Loop block on WP 5.9?

It does work. What I think is missing in WP 5.9 is core/query-no-results, but the Query Loop block is there. (I didn't do too much research, though)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block-type: product-query Issues related to/affecting all product-query variations. type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants