Automattic\WooCommerce\Blocks\BlockTypes
AddToCartWithOptionsQuantitySelector::enqueue_assets()
Enqueue assets specific to this block. We enqueue frontend scripts only if the quantitySelectorStyle is set to 'stepper'.
Method of the class: AddToCartWithOptionsQuantitySelector{}
No Hooks.
Return
null
. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->enqueue_assets( $attributes, $content, $block );
- $attributes(array) (required)
- Block attributes.
- $content(string) (required)
- Block content.
- $block(WP_Block) (required)
- Block instance.
AddToCartWithOptionsQuantitySelector::enqueue_assets() AddToCartWithOptionsQuantitySelector::enqueue assets code WC 9.6.1
protected function enqueue_assets( $attributes, $content, $block ) { if ( 'stepper' !== $attributes['quantitySelectorStyle'] ) { return; } parent::enqueue_assets( $attributes, $content, $block ); }