Yoast\WP\SEO\Integrations\Third_Party
WooCommerce::description() public Yoast 1.0
Handles the meta description.
{} Это метод класса: WooCommerce{}
Хуков нет.
Возвращает
Строку. The description to use.
Использование
$WooCommerce = new WooCommerce(); $WooCommerce->description( $description, $presentation );
- $description(строка) (обязательный)
- The title.
- $presentation(Indexable_Presentation)
- The indexable presentation.
По умолчанию: null
Код WooCommerce::description() WooCommerce::description Yoast 15.6.2
public function description( $description, $presentation = null ) {
$presentation = $this->ensure_presentation( $presentation );
if ( $presentation->model->description ) {
return $description;
}
if ( ! $this->is_shop_page() ) {
return $description;
}
if ( ! \is_archive() ) {
return $description;
}
$shop_page_id = $this->get_shop_page_id();
if ( $shop_page_id < 1 ) {
return $description;
}
$product_template_description = $this->get_product_template( 'metadesc-product', $shop_page_id );
if ( $product_template_description ) {
return $product_template_description;
}
return $description;
}