WC_Brands_Admin::validate_product_base()publicWC 1.0

Validate the product base.

Must have an additional slug, not just the brand as the base.

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

Хуков нет.

Возвращает

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

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

$WC_Brands_Admin = new WC_Brands_Admin();
$WC_Brands_Admin->validate_product_base( $value );
$value(массив) (обязательный)
Value.

Код WC_Brands_Admin::validate_product_base() WC 9.4.2

public function validate_product_base( $value ) {
	if ( '/%product_brand%/' === trailingslashit( $value['product_base'] ) ) {
		$value['product_base'] = '/' . _x( 'product', 'slug', 'woocommerce' ) . $value['product_base'];
	}

	return $value;
}