Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Fatal error when exporting products. String was treated as array.
``` Uncaught TypeError: implode(): Argument twoelevenjay#2 ($array) must be of type ?array, string given in /path/to/wp-content/plugins/woocommerce-discontinued-products/includes/class-dp-csv-import-export.php:156 Stack trace: #0 /path/to/wp-content/plugins/woocommerce-discontinued-products/includes/class-dp-csv-import-export.php(156): implode(', ', '') twoelevenjay#1 /path/to/wp-includes/class-wp-hook.php(309): DP_CSV_Import_Export->add_export_data_alt_products('', Object(WC_Product_Simple)) twoelevenjay#2 /path/to/wp-includes/plugin.php(191): WP_Hook->apply_filters('', Array) twoelevenjay#3 /path/to/wp-content/plugins/woocommerce/includes/export/class-wc-product-csv-exporter.php(232): apply_filters('woocommerce_pro...', '', Object(WC_Product_Simple), 'alt_products') twoelevenjay#4 /path/to/wp-content/plugins/woocommerce/includes/export/class-wc-product-csv-exporter.php(185): WC_Product_CSV_Exporter->generate_row_data(Object(WC_Product_Simple)) twoelevenjay#5 /path/to/wp-content/plugins/woocommerce/includes/export/abstract-wc-csv-batch-exporter.php(117): WC_Product_CSV_Exporter->prepare_data_to_export() twoelevenjay#6 /path/to/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-exporters.php(165): WC_CSV_Batch_Exporter->generate_file() twoelevenjay#7 /path/to/wp-includes/class-wp-hook.php(307): WC_Admin_Exporters->do_ajax_product_export('') twoelevenjay#8 /path/to/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array) twoelevenjay#9 /path/to/wp-includes/plugin.php(476): WP_Hook->do_action(Array) twoelevenjay#10 /path/to/wp-admin/admin-ajax.php(187): do_action('wp_ajax_woocomm...') twoelevenjay#11 {main} thrown ```
- Loading branch information