AllProducts::enqueue_data() – Extra data passed through from server to client for block.

You appear to be a bot. Output may be restricted

Description

Extra data passed through from server to client for block.

Usage

AllProducts::enqueue_data( $attributes );

Parameters

$attributes
( array ) optional – Any attributes that currently are available from the block. Note, this will be empty in the editor context when the block is not in the post content on editor load.

Returns

void

Source

File name: woocommerce/packages/woocommerce-blocks/src/BlockTypes/AllProducts.php


Lines:

1 to 11 of 11
  protected function enqueue_data( array $attributes = [] ) {
    parent::enqueue_data( $attributes );
    $this->asset_data_registry->add( 'min_columns', wc_get_theme_support( 'product_blocks::min_columns', 1 ), true );
    $this->asset_data_registry->add( 'max_columns', wc_get_theme_support( 'product_blocks::max_columns', 6 ), true );
    $this->asset_data_registry->add( 'default_columns', wc_get_theme_support( 'product_blocks::default_columns', 3 ), true );
    $this->asset_data_registry->add( 'min_rows', wc_get_theme_support( 'product_blocks::min_rows', 1 ), true );
    $this->asset_data_registry->add( 'max_rows', wc_get_theme_support( 'product_blocks::max_rows', 6 ), true );
    $this->asset_data_registry->add( 'default_rows', wc_get_theme_support( 'product_blocks::default_rows', 3 ), true );
    $this->asset_data_registry->add( 'hideOutOfStockItems', 'yes' === get_option( 'woocommerce_hide_out_of_stock_items' ), true );
  }
 

 View on GitHub View on Trac