WordPress at Your Fingertips
function is not described

WC_Admin_Exporters::get_product_types() public WC 5.1.0

Gets the product types that can be exported.

{} It's a method of the class: WC_Admin_Exporters{}

Hooks from the method

Return

Array. The product types keys and labels.

Usage

$result = WC_Admin_Exporters::get_product_types();

Changelog

Since 5.1.0 Introduced.

Code of WC_Admin_Exporters::get_product_types() WC 5.9.0

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 );
}