1. Home
  2. Docs
  3. Topics
  4. Code Snippets
  5. FooSales Order Meta Updates

FooSales Order Meta Updates

FooSales has the ability to view “Online Only” and “POS Only” orders separately in the WooCommerce Analytics  > Orders report. This is achieved by using a ‘Sales Channel‘ filter.

Only orders that were created after the FooSales WordPress plugin was updated to version 1.28.1 include the required order meta to view “Online Only” orders.

In order for previous online orders to be reflected accurately when using the ‘Online Only’ filter, you will need to run a script that adds the relevant meta to all orders that were processed through online checkout. To make it easier for you to do this, we have created a simple plugin that will allow you to run the updates in small batches. If you would like to proceed and add the meta data to previous orders, please follow these steps:

  1. NB: We highly recommend that you first create a back-up of your current website files and database before proceeding beyond this point and make use of a staging site where possible
  2. Download the FooSales Order Meta Updater plugin
  3. Login to your WordPress Admin Dashboard
  4. Go to Plugins > Add New in the main menu
  5. Upload the plugin zip file
  6. Click on Plugins in the main menu
  7. Find the plugin and Activate it
  8. Go to FooSales Order Meta Updater in the main menu
  9. This screen will allow you to add the order meta data that can be used to determine if previous orders were placed online. By default, the FooSales Order Meta Updater plugin will update 100 orders at a time. This is a safe limit and should only take a second to complete. Depending on the size of your database and the capacity of your server, you can adjust the order amount as needed.
  10. Once you have set the preferred order amount, click the Run Updater button. The FooSales Order Meta Updater plugin will then update the specified number of orders.
  11. After each batch has completed, continue to run the updater by clicking the Run Updater button until there are no remaining orders that require updates.
  12. When zero orders remain, please remove the FooSales Order Meta Updater plugin by going to Plugins in the main menu and then deactivating and deleting the FooSales Order Meta Updater plugin.

All orders that were placed online should now include the FooSales order meta and reflect in your WooCommerce Analytics Orders Report. If the orders do not reflect correctly, you may need to clear the WooCommerce Analytics cache. To do so, please follow these steps:

  1. Login to your WordPress Admin Dashboard
  2. Go to WooCommerce > Status > Tools
  3. Scroll down to the Clear analytics cache setting and click the Clear button.

 

Tags , , , , ,
Was this article helpful to you? Yes No