WC_Shortcode_Products::__construct()publicWC 3.2.0

Initialize shortcode.

Метод класса: WC_Shortcode_Products{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WC_Shortcode_Products = new WC_Shortcode_Products();
$WC_Shortcode_Products->__construct( $attributes, $type );
$attributes(массив)
Shortcode attributes.
По умолчанию: array()
$type(строка)
Shortcode type.
По умолчанию: 'products'

Список изменений

С версии 3.2.0 Введена.

Код WC_Shortcode_Products::__construct() 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();
}