https://github.com/pokhiii/wc-queries
Beautiful queries for WooCommerce.
https://github.com/pokhiii/wc-queries
action-scheduler sql woocommerce woocommerce-subscription
Last synced: 4 months ago
JSON representation
Beautiful queries for WooCommerce.
- Host: GitHub
- URL: https://github.com/pokhiii/wc-queries
- Owner: pokhiii
- License: mit
- Created: 2020-01-28T12:38:26.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-17T14:03:41.000Z (almost 5 years ago)
- Last Synced: 2025-01-03T03:37:53.026Z (5 months ago)
- Topics: action-scheduler, sql, woocommerce, woocommerce-subscription
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wc-action-scheduler-query
Queries for the WooCommerce Action Scheduler 3.0.## WooCommerce Subscriptions
### Finding schedule for renewals
```sql
SELECT
`scheduled_date_local`, `args`
FROM
`wp_actionscheduler_actions`
WHERE
`status` = 'pending' # Status: 'canceled', 'complete', 'failed', 'pending'
AND `hook` = 'woocommerce_scheduled_subscription_payment'
AND `scheduled_date_local` >= '2020-01-28 00:00:00' # Start time
AND `scheduled_date_local` < '2020-01-29 00:00:00' # End time
ORDER BY
`scheduled_date_local`;
```