Last active
July 13, 2021 10:44
-
-
Save bgrgicak/de6c675c832276ae852cb3330f448e62 to your computer and use it in GitHub Desktop.
Import WooCommerce Admin orders using the Action scheduler CLI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd /var/www/ | |
wp action-scheduler run --batch-size=10 --hooks=wc-admin_queue_batches_orders,wc-admin_import_batch_orders 2>&1 | awk -v commandid=$1 '{ "date +%Y-%m-%d\\ %T.%3N" | getline timestamp; print timestamp, commandid, $0; fflush(); }' >> ~/cli.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment