Automattic\WooCommerce\Blocks\BlockTypes
AddToCartWithOptionsQuantitySelector::parse_attributes()
Get the block's attributes.
Метод класса: AddToCartWithOptionsQuantitySelector{}
Хуков нет.
Возвращает
Массив
. Block attributes merged with defaults.
Использование
// private - только в коде основоного (родительского) класса $result = $this->parse_attributes( $attributes );
- $attributes(массив) (обязательный)
- Block attributes.
По умолчанию: empty array
Код AddToCartWithOptionsQuantitySelector::parse_attributes() AddToCartWithOptionsQuantitySelector::parse attributes WC 9.8.5
private function parse_attributes( $attributes ) { // These should match what's set in JS `registerBlockType`. $defaults = array( 'quantitySelectorStyle' => 'input', ); return wp_parse_args( $attributes, $defaults ); }