Created
March 23, 2018 15:58
-
-
Save Garconis/fed50151797d08901059388cf602d7f6 to your computer and use it in GitHub Desktop.
WordPress | Help WP All Import pull in a file if it has today's date in the filename
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// create a function that returns the path of the product import CSV with today's date at the end of the filename | |
function fs_import_gen_url() { | |
return "https://www.example.com/csv/your-product-import-" . date("Y_m_d") . ".csv"; | |
// e.g., YYYY_MM_DD = 2019_03_23 | |
} | |
// then add this shortcode as the URL for the WP All Import file: [fs_import_gen_url()] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment