Automattic\WooCommerce\EmailEditor\Integrations\WooCommerce\Renderer\Blocks
Product_Image::parse_attributes
Parse block attributes with defaults.
Метод класса: Product_Image{}
Хуков нет.
Возвращает
array.
Использование
// private - только в коде основоного (родительского) класса $result = $this->parse_attributes( $attributes ): array;
- $attributes(массив) (обязательный)
- Block attributes.
Код Product_Image::parse_attributes() Product Image::parse attributes WC 11.2.2
private function parse_attributes( array $attributes ): array {
return wp_parse_args(
$attributes,
array(
'showProductLink' => true,
'imageSizing' => 'single',
'scale' => 'cover',
'showSaleBadge' => false,
'saleBadgeAlign' => 'right',
)
);
}