WC_Shortcode_Products::__construct()publicWC 3.2.0

Initialize shortcode.

Method of the class: WC_Shortcode_Products{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Shortcode_Products = new WC_Shortcode_Products();
$WC_Shortcode_Products->__construct( $attributes, $type );
$attributes(array)
Shortcode attributes.
Default: array()
$type(string)
Shortcode type.
Default: 'products'

Changelog

Since 3.2.0 Introduced.

WC_Shortcode_Products::__construct() code WC 8.7.0

public function __construct( $attributes = array(), $type = 'products' ) {
	$this->type       = $type;
	$this->attributes = $this->parse_attributes( $attributes );
	$this->query_args = $this->parse_query_args();
}