Add custom bulk actions to admin orders list in Woocommerce 3
问题 In Woocommerce backend (admin) , I have a function that allows the shop-manager to download all orders between two dates with a specific bunch of required data: function write_to_file($date_initial, $date_final) { global $attach_download_dir, $attach_download_file; // Opens/creates file $myfile = fopen($attach_download_dir . '/' . $attach_download_file, "w") or die("Unable to open file!"); // Populates first line fwrite($myfile, 'Date; Parent Order ID; Order ID' . PHP_EOL); // Retrieves