FunnelKit Automations has a CRON worker URL that runs every midnight and picks up the contact based on their WooCommerce Subscriptions’ due date and the number of days set in the event.
But we will be hitting that worker URL manually and triggering our WooCommerce Subscription Before Revewal automation.
For that, we have a simple subscription reminder workflow in FunnelKit Automations:
We have configured the event 3 days before the renewal date.
Before we run this automation manually, we need two plugins:
- WooCommerce Subscriptions
- Database access
We will take this subscription as an example which is due 3 days from today.
To run the automation on this contact manually, follow the step-by-step process below:
Step 1: Configure the ‘Automations_Meta’ table in your database
For database access, we will use these two tables: [database_prefix]_bwfan_automationmeta and [database_prefix]_bwf_actions
In our case, the database name is wp.
So, go to the “wp_bwfan_automationmeta” table and enter the automation ID.
You can find the automation ID here:
Enter the automation ID here and click on Save.
Before we start setting the CRON time, remove the last_run key from here.
Look for the “last_run” meta key in this table and hit Delete. Don’t worry if its not present. This would mean that the event is yet to be triggered for the first time.
Step 2: Reset the Midnight CRON in the ‘BWF_Actions’ table
Next, go to the “wp_bwf_actions” table and you’ll see the midnight cron here.
Edit it and put the e-time as 0 (zero).
Click on Save and you’ll see its value changed to 0 here.
Step 3: Hit the worker URL in your browser
Hit the CRON worker URL: your_domain_name/wp-json/woofunnels/v1/worker
And, you’ll see this success message hitting up.
Step 4: Check the automation
Go to your Subscription automation and hit refresh.
Your contact will get scheduled to run.
To again run it manually, remove the last_run from the Automationsmeta table, put the e-time in CRON as 0 and hit the worker URL - the automation will trigger again.
That’s it! This is how you can run the WooCommerce Subscriptions before renewal event manually with FunnelKit Automations.