diff --git a/plugins/woocommerce-blocks/src/BlockTypesController.php b/plugins/woocommerce-blocks/src/BlockTypesController.php index b742aa2d94e..dbc38806438 100644 --- a/plugins/woocommerce-blocks/src/BlockTypesController.php +++ b/plugins/woocommerce-blocks/src/BlockTypesController.php @@ -76,7 +76,7 @@ final class BlockTypesController { */ public function add_data_attributes( $content, $block ) { $block_name = $block['blockName']; - $block_namespace = strtok( $block_name, '/' ); + $block_namespace = strtok( $block_name ?? '', '/' ); /** * Filters the list of allowed block namespaces.