Automattic\WooCommerce\StoreApi\Schemas\V1
ShopperListItemSchema::get_name
Get the displayable name for the live product.
Method of the class: ShopperListItemSchema{}
No Hooks.
Returns
String.
Usage
// private - for code of main (parent) class only $result = $this->get_name( $product ): string;
- $product(WC_Product) (required)
- Live product instance.
ShopperListItemSchema::get_name() ShopperListItemSchema::get name code WC 10.9.4
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();
}