Automattic\WooCommerce\EmailEditor\Integrations\WooCommerce\Renderer\Blocks
Product_Image::parse_attributes
Parse block attributes with defaults.
Method of the class: Product_Image{}
No Hooks.
Returns
Array.
Usage
// private - for code of main (parent) class only $result = $this->parse_attributes( $attributes ): array;
- $attributes(array) (required)
- Block attributes.
Product_Image::parse_attributes() Product Image::parse attributes code WC 10.7.0
private function parse_attributes( array $attributes ): array {
return wp_parse_args(
$attributes,
array(
'showProductLink' => true,
'imageSizing' => 'single',
'scale' => 'cover',
'showSaleBadge' => false,
'saleBadgeAlign' => 'right',
)
);
}