WC_Product_CSV_Exporter::set_product_category_to_export()publicWC 3.5.0

Product category to export

Method of the class: WC_Product_CSV_Exporter{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Product_CSV_Exporter = new WC_Product_CSV_Exporter();
$WC_Product_CSV_Exporter->set_product_category_to_export( $product_category_to_export );
$product_category_to_export(string) (required)
Product category slug to export, empty string exports all.

Changelog

Since 3.5.0 Introduced.

WC_Product_CSV_Exporter::set_product_category_to_export() code WC 8.6.1

public function set_product_category_to_export( $product_category_to_export ) {
	$this->product_category_to_export = array_map( 'sanitize_title_with_dashes', $product_category_to_export );
}