sequra_is_block_checkout

Hook Filter

Check if the checkout is the Gutenberg block based version

Description

This filter allows modifying the plugin's evaluation of whether the checkout page is using Gutenberg blocks or the classic WooCommerce shortcode to render the checkout form. Some themes may generate false positives by rendering a block on the page alongside the WooCommerce Checkout shortcode. In such cases, you may need to set it to false, as shown in the example below.

Parameters

ParameterTypeDescription
$is_block_checkoutboolDetermine if the checkout is using Gutenberg blocks

Changelog

VersionDescription
3.0.0Introduced

Usage Example

add_filter('sequra_is_block_checkout', function( $is_block_checkout ){
 $is_block_checkout = false; // Gutenberg blocks are disabled for the checkout.
 return $is_block_checkout;
});