Integration & Printer Setup
TABLE OF CONTENTS
In this tutorial, we’ll show you how you can get the Order ID, Order Status and the time the order was Accepted For, so that you can notify your customers soon after the kitchen processes the request.
You probably had to create a Notify URL page when setting up our plugin for WooCommerce. The shortcode in this page triggers a function that retrieves certain data for the most recent order, one of which is the Order Status. The function then saves this data into the database of your website.
So, what we will be doing is accessing this database, and then check every 20 seconds to see if the order status has been updated from Pending to either Accepted or Rejected. This code will be placed in the WooCommerce thankyou.php page so the customer can see the updates immediately after placing an order.
Purpose of the Notify URL
Let's Get Started!
Navigate to pco.link/shortcode-maker
Download the free version. Upload, install and activate it for your WordPress site.
- From the WordPress panel on the left, scroll down to XYZ PHP Code > PHPCode Snippets.
- Click the Add New PHP Code Snippet button.
- Enter a name for your shortcode.
- Copy and paste the code snippet below into the PHP code field.