Configuring the WordPress Schedule for Automatic Stores CSV Import

Our plugin offers a scheduling feature that allows you to automatically import store locations from CSV files. To utilize this feature, you simply need to place your CSV files in the designated directory. The plugin will then process the files based on their timestamps, importing any files that are newer than the previously imported ones.

The directory where you should place your CSV files for automatic import is:

/wp-content/uploads/agile-store-locator/cron

By leveraging this functionality, you can easily keep your store locator updated with the latest store location data without manual intervention. Simply upload your CSV files to the specified directory, and the plugin will take care of the rest, ensuring that your store locations are regularly synchronized with the provided CSV files.

Notifications #

Once this step is completed, your cron job setup is complete. Furthermore, whenever a CSV is processed it will send you an email for the import rows and the file count, for this reason, please make sure to add an email address in the admin “Notification” field and enable the checkbox “Notification” in the ASL Settings.

Troubleshooting Guide for WP Scheduling and CSV Import #

To troubleshoot issues related to CSV file imports using WordPress scheduling in the Agile Store Locator plugin. Below are common scenarios and steps to address them.

1. Outdated File Uploaded:

  • Issue: The CSV file may not be imported if it’s outdated, as the cron job processes only newly uploaded files.
  • Resolution Steps:
    • Ensure that you are uploading a recently updated CSV file to the designated directory.
    • Check the modification date of the CSV file to confirm if it meets the criteria for processing by the cron job.

2. Incorrect CSV Format:

  • Issue: CSV files with incorrect formats may not be imported successfully.
  • Resolution Steps:
    • Verify that the CSV file format matches the demo file provided within the plugin.
    • Check for any discrepancies in column headers, data types, or delimiters that might cause import failures.
    • Validate the CSV file using a spreadsheet application or a CSV validation tool to ensure it meets the required format.

3. Cron Job Verification:

  • Issue: The cron job may not be executing as expected.
  • Resolution Steps:
    • Install a Cron Manager plugin to inspect the list of scheduled cron jobs.
    • Check if the ‘asl_import_cron’ job is listed and active.
    • Verify the scheduling frequency and parameters associated with the cron job to ensure it’s configured correctly.

4. Manual Execution Test:

  • Issue: Uncertainty about whether the import process is functioning properly.
  • Resolution Steps:
    • Add a new CSV file to the designated directory: /wp-content/uploads/agile-store-locator/cron.
    • Use the Cron manager plugin to manually execute the ‘asl_import_cron’ job.
    • Monitor the import process closely to determine if the new file is imported successfully.
    • Analyze any error messages or notifications generated during the manual execution for insights into potential issues.

API Based Solution #

Agile Store Locator has a separate addon that can keep your store’s data synchronized with any kind of REST API, for more details on it visit the page about Agile Sync Data Addon.