WC_Admin_Exporters::get_product_types()
Gets the product types that can be exported.
Метод класса: WC_Admin_Exporters{}
Хуки из метода
Возвращает
Массив
. The product types keys and labels.
Использование
$result = WC_Admin_Exporters::get_product_types();
Список изменений
С версии 5.1.0 | Введена. |
Код WC_Admin_Exporters::get_product_types() WC Admin Exporters::get product types WC 9.5.1
public static function get_product_types() { $product_types = wc_get_product_types(); $product_types['variation'] = __( 'Product variations', 'woocommerce' ); /** * Allow third-parties to filter the exportable product types. * * @since 5.1.0 * @param array $product_types { * The product type key and label. * * @type string Product type key - eg 'variable', 'simple' etc. * @type string A translated product label which appears in the export product type dropdown. * } */ return apply_filters( 'woocommerce_exporter_product_types', $product_types ); }