Automattic\WooCommerce\StoreApi\Schemas\V1
ShopperListItemSchema::get_name
Get the displayable name for the live product.
Метод класса: ShopperListItemSchema{}
Хуков нет.
Возвращает
string.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_name( $product ): string;
- $product(WC_Product) (обязательный)
- Live product instance.
Код ShopperListItemSchema::get_name() ShopperListItemSchema::get name WC 11.2.2
private function get_name( \WC_Product $product ): string {
$prepared = $this->prepare_html_response( $product->get_title() );
return is_string( $prepared ) ? $prepared : (string) $product->get_title();
}