Automattic\WooCommerce\Blocks\BlockTypes
ProductGalleryLargeImage::add_block_type_metadata_settings
Viewer renders inner blocks manually so we need to skip default rendering routine for its inner blocks
Method of the class: ProductGalleryLargeImage{}
No Hooks.
Returns
Array.
Usage
$ProductGalleryLargeImage = new ProductGalleryLargeImage(); $ProductGalleryLargeImage->add_block_type_metadata_settings( $settings, $metadata );
- $settings(array) (required)
- Array of determined settings for registering a block type.
- $metadata(array) (required)
- Metadata provided for registering a block type.
ProductGalleryLargeImage::add_block_type_metadata_settings() ProductGalleryLargeImage::add block type metadata settings code WC 10.8.1
public function add_block_type_metadata_settings( $settings, $metadata ) {
if ( ! empty( $metadata['name'] ) && 'woocommerce/product-gallery-large-image' === $metadata['name'] ) {
$settings['skip_inner_blocks'] = true;
}
return $settings;
}