hi
try this code
// support tags {ordernumber} and {product_name} in filename
add_filter('woe_make_filename_replacements', function ($pairs) {
$order= new WC_Order( WC_Order_Export_Engine::$order_id);
$pairs['{ordernumber}'] = $order->get_order_number(); // order field
foreach($order->get_items('line_item') as $item_id=>$item) {
$pairs['{product_name}'] = $item['name'];
break; //1st product only!
}
return $pairs;
});
Hi Alex,
It doesn’t seem like it worked. We’re still running version 1.5.5 of the plugin, would the new version and the code fix this problem?
hi
my bad, this code works for button “Export without progress” only.
thanks, Alex
Hi Alex,
Unfortunately still not working for me. Is there anything I can send you to review my settings or layout to see if you can help me better?
Thanks!
Tom
hi Tom
you can submit settings to helpdesk . use tab “Tools” to get them
Hey Alex,
Can do, I’ve submitted the settings to the helpdesk topic. I’m hoping to add that functionality to all of our export processes. Let me know if you need anything else. Thanks again and have a good day!
Tom