Skip to content

Instantly share code, notes, and snippets.

@Garconis
Created March 23, 2018 15:58
Show Gist options
  • Save Garconis/fed50151797d08901059388cf602d7f6 to your computer and use it in GitHub Desktop.
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
<?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