From 27dd962be7d540e582af9809807040805335f123 Mon Sep 17 00:00:00 2001 From: Luciano Amodio Date: Sat, 16 Dec 2017 13:49:21 +0100 Subject: [PATCH] Add WC Product CSV Exporter limit filter with tons of products is nice to have an way to change the limit for the exporter (now is set to 50) '''php function wc_exporter_set_limit($limit) { return 1000; } add_filter( 'woocommerce_product_export_product_default_limit', 'wc_exporter_set_limit'); ''' --- includes/export/class-wc-product-csv-exporter.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/export/class-wc-product-csv-exporter.php b/includes/export/class-wc-product-csv-exporter.php index ee006f9e9fa..3114f5fcb02 100644 --- a/includes/export/class-wc-product-csv-exporter.php +++ b/includes/export/class-wc-product-csv-exporter.php @@ -50,6 +50,7 @@ class WC_Product_CSV_Exporter extends WC_CSV_Batch_Exporter { */ public function __construct() { parent::__construct(); + $this->set_limit(apply_filters( "woocommerce_product_export_{$this->export_type}_default_limit", $this->limit)); $this->set_product_types_to_export( array_merge( array_keys( wc_get_product_types() ), array( 'variation' ) ) ); }