Support » Plugins » Using wp-cli to create WooCommerce orders doesn't trigger order creation webhook

  • I’m using wp-cli to create orders in WooCommerce.

    The orders get created just fine, but the order creation webhook doesn’t fire.

    If I go into the order after it’s created and just click “Save” then the order edited webhook fires just fine. But the logs shows that the order created webhook has never fired when an order has been created by wp-cli.

    Is there a way for me to fire either the creation or the edit webhook from the command line?

    My order creation command looks like this:

    wp wc order create --path=/home/mqwr/public_html/wordpress --status='processing' --customer_id=324 --billing_address.first_name='Chester' --billing_address.last_name='Tester' --billing_address.address_1='123 Testing Lane' --billing_address.city='Testville' --billing_address.state='TN' --billing_address.postcode='12345' --billing_address.country='US' --billing_address.email='chester@tester.com' --billing_address.phone='8002345678' --shipping_address.first_name='Chester' --shipping_address.last_name='Tester' --shipping_address.address_1='123 Testing Lane' --shipping_address.city='Testville' --shipping_address.state='TN' --shipping_address.postcode='12345' --shipping_address.country='US' --note='Ship Via: FedEx Ground' --line_items.0.product_id=119 --line_items.0.quantity=1 --line_items.1.product_id=130 --line_items.1.quantity=2

    Any ideas?
    Thanks.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Using wp-cli to create WooCommerce orders doesn't trigger order creation webhook’ is closed to new replies.