WC_Structured_Data::get_data_type_for_page
Get data types for pages.
Method of the class: WC_Structured_Data{}
Hooks from the method
Returns
Array.
Usage
// protected - for code of main (parent) or child class $result = $this->get_data_type_for_page();
WC_Structured_Data::get_data_type_for_page() WC Structured Data::get data type for page code WC 10.9.4
protected function get_data_type_for_page() {
$types = array();
$types[] = is_shop() || is_product_category() || is_product() ? 'product' : '';
$types[] = is_shop() && is_front_page() ? 'website' : '';
$types[] = is_product() ? 'review' : '';
$types[] = 'breadcrumblist';
$types[] = 'order';
return array_filter( apply_filters( 'woocommerce_structured_data_type_for_page', $types ) );
}