WC_Shortcode_Products::__construct
Initialize shortcode.
Method of the class: WC_Shortcode_Products{}
No Hooks.
Returns
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() WC Shortcode Products:: construct code WC 10.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();
}