Automattic\WooCommerce\Blocks\BlockTypes
ProductButton::enqueue_assets()
Enqueue frontend assets for this block, just in time for rendering.
Method of the class: ProductButton{}
No Hooks.
Returns
null
. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->enqueue_assets( $attributes, $content, $block );
- $attributes(array) (required)
- Any attributes that currently are available from the block.
- $content(string) (required)
- The block content.
- $block(WP_Block) (required)
- The block object.
ProductButton::enqueue_assets() ProductButton::enqueue assets code WC 9.8.5
protected function enqueue_assets( array $attributes, $content, $block ) { parent::enqueue_assets( $attributes, $content, $block ); if ( wc_current_theme_is_fse_theme() ) { add_action( 'wp_enqueue_scripts', array( $this, 'dequeue_add_to_cart_scripts' ) ); } }