WC_Shortcode_Products::__construct( array $attributes = array(), string $type = 'products' )
Initialize shortcode.
Description Description
Parameters Parameters
- $attributes
-
(Optional) Shortcode attributes.
Default value: array()
- $type
-
(Optional) Shortcode type.
Default value: 'products'
Source Source
File: includes/shortcodes/class-wc-shortcode-products.php
public function __construct( $attributes = array(), $type = 'products' ) {
$this->type = $type;
$this->attributes = $this->parse_attributes( $attributes );
$this->query_args = $this->parse_query_args();
}
Changelog Changelog
| Version | Description |
|---|---|
| 3.2.0 | Introduced. |