Blocks not rendering in WooCommerce
-
Hi,
it seems, that the plugin is not working in WooCommerce. I’m using the plugin in the shop page and as soon as I open the page, the toggle block isn’t rendered correctly. The text is shown, but there is no functionality.
While looking this up, I found that the styles and script file aren’t loaded and even after loading them with enqueue_block_assets / wp_enqueue_scripts the most I can get is a styled toggle block standard block with no customization.
I used those lines of code:
add_action('enqueue_block_assets', function () { wp_register_style('woo-ultimate-blocks-css', plugin_dir_url('') . 'ultimate-blocks/dist/blocks.style.build.css'); wp_enqueue_style('woo-ultimate-blocks-css'); }); add_action('enqueue_block_assets', function () { wp_register_script('woo-ultimate-blocks-js', plugin_dir_url('') . 'ultimate-blocks/dist/font.build.js'); wp_enqueue_script('woo-ultimate-blocks-js'); });
Do you have any tipps/tricks I can use to get the block rendered correctly?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Blocks not rendering in WooCommerce’ is closed to new replies.