WC_Brands::add_brand_products_shortcode_atts()
Adds the "brand" attribute to the list of WooCommerce products shortcode attributes.
Method of the class: WC_Brands{}
No Hooks.
Return
Array
. The output array of shortcode attributes.
Usage
$result = WC_Brands::add_brand_products_shortcode_atts( $out, $pairs, $atts, $shortcode );
- $out(array) (required)
- The output array of shortcode attributes.
- $pairs(array) (required)
- The supported attributes and their defaults.
- $atts(array) (required)
- The user defined shortcode attributes.
- $shortcode(string) (required)
- The shortcode name.
WC_Brands::add_brand_products_shortcode_atts() WC Brands::add brand products shortcode atts code WC 9.5.1
public static function add_brand_products_shortcode_atts( $out, $pairs, $atts, $shortcode ) { $out['brand'] = array_key_exists( 'brand', $atts ) ? $atts['brand'] : ''; return $out; }