Hey @corayl,
I will export all the orders as individual files and what I need is that they be saved in a specific folder (public_html / domain / export) how can I do it?
You’d have to write custom code that ties into our API to grab the export file and move it after the export. There’s an example snippet here: https://www.wpallimport.com/documentation/developers/code-snippets/#move-export-file-after-export.
Thread Starter
corayl
(@corayl)
Hello, thank you very much for your answer.
I had already done it this way, but it doesn’t work for me. that is, copying and pasting it saves it in the uploadas folder, but if I change the location that appears by default (basedir) it does not save me in the address I entered.
I want to save it in / public_html / exports
Hey @corayl,
We can’t help adjust the code, but to explain how it’d work:
– Use the get_home_path() function to get the path you want, e.g.:
$new_path = get_home_path() . 'exports';
– Use file_exists() to check if it exists, and mkdir() to make it if it doesn’t.
– Add the filename to the path and rename() it as shown in the example snippet on our site.
Hey @corayl,
I’m marking this as resolved since it’s been inactive for a while. Please open a new topic if you still have questions.