PHP snippet for FluentCart users with hybrid themes: Make the Product Description block available in your builder
If you're using a hybrid block theme instead of a full FSE/block theme, you may notice that FluentCart's native Product Description block isn't available everywhere in the block builder.
The block itself already exists in FluentCart and works perfectly fine. FluentCart simply restricts it to certain FluentCart parent/ancestor blocks.
If you want to use the native Product Description block freely inside your own product template, you can remove that restriction with this small snippet:
/**
* FluentCart 1.6.x
* Make the native Product Description block available everywhere
* in the WordPress block editor.
*
* No custom block is created.
* No product data is changed.
* FluentCart's original block and rendering are still used.
*/
add_filter('register_block_type_args', function ($args, $block_type) {
if ($block_type !== 'fluent-cart/product-description') {
return $args;
}
unset($args['ancestor']);
unset($args['parent']);
return $args;
}, 20, 2);
After adding the snippet, search for:
Product Description
in the block inserter.
You can then place FluentCart's native Product Description block directly inside your own hybrid-theme product template, wherever you want it.
For example:
Product Gallery + Product Info
Product Description
Related Products
The nice thing about this approach is that it doesn't introduce a shortcode, duplicate content, or create a separate description system.
You're still using FluentCart's own native Product Description block, including its normal block styling and settings. It simply becomes available outside of the parent blocks FluentCart normally restricts it to.
Might be useful for anyone building FluentCart product templates with a hybrid theme rather than a full FSE theme.
