0

i am writing a block that extends some core blocks, so when i refrence them i use the way wordpress refrence them: "core/group", "core/heading" and so on. and it works great. i cannot do that to woocommerce blocks. for example "woocommerce/product-price" it does not work. why can't i reference woocommerce blocks? or maybe i do not refrence them the right way?

i have for example

const ALLOWED_BLOCKS = ["core/group", "core/heading"]

i want to reference woocommerce blocks the same way

3
  • 1
    perhaps the name is wrong, you can find out by copying a woocommerce block into a text editor and looking at the HTML comment. Otherwise if that's not it there's probably not enough information to figure it out in your question, or it's a WooCommerce specific problem that needs you to ask in a WC community. Also how are you testing this? And when you say "extends" what do you mean?
    – Tom J Nowell
    Dec 5, 2023 at 16:43
  • hi,"the HTML comment" i have done that, and it doesn't work. when i say extend i mean,for example, adding to the group and heading blocks, the abbility to use the rotate css rule. so when one select a group block, i display the ui to change the rotate property
    – Ron
    Dec 6, 2023 at 9:07
  • I'm not seeing the HTML comment in your question, I wasn't suggesting it as a way to fix your problem but rather to help people on this site understand and help you. There is almost no code in your question to work with, you'll need to provide a lot more of the code and examples of what you're working with. Use the edit link to improve your question to make it easier to understand and work with, but not that 3rd party plugin support is offtopic here and not in this stacks scope, if at any point your question requires knowledge of WooCommerce to be answerable it should be closed as offtopic
    – Tom J Nowell
    Dec 6, 2023 at 10:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.