Yoast\WP\SEO\Integrations\Third_Party
WooCommerce::get_product_template() protected Yoast 1.0
Uses template for the given option name and replace the replacement variables on it.
{} Это метод класса: WooCommerce{}
Хуков нет.
Возвращает
Строку. The rendered value.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_product_template( $option_name, $shop_page_id );
- $option_name(строка) (обязательный)
- The option name to get the template for.
- $shop_page_id(строка) (обязательный)
- The page id to retrieve template for.
Код WooCommerce::get_product_template() WooCommerce::get product template Yoast 15.7
protected function get_product_template( $option_name, $shop_page_id ) {
$template = $this->options->get( $option_name );
$page = \get_post( $shop_page_id );
return $this->replace_vars->replace( $template, $page );
}