Trigger sms sending based on customized order status in woocommerce -


i using woocommerce twilio extension allow me trigger sms based on order status changes in woocommerce. have added 2 new customized order status - namely shipping , delivered. know action hook can used hook, auto send out sms in twilio.

    // customer order status change hooks     foreach( array( 'pending', 'failed', 'on-hold', 'processing', 'completed', 'refunded', 'cancelled' ) $status ) {          add_action( 'woocommerce_order_status_' . $status, array( $this, 'send_customer_notification' ) );     } 

looking @ script of extension, seems me not able because there no woocommerce_order_statsus_shipping or woocommerce_order_statsus_delivered can hook to.

any way work around limitation?

while haven't worked woocommerce specifically, have done lot wp hooks in general. looks there 2 different ways catch one:

woocommerce_order_status_.$new_status->slug 

which looks gets fired when order shifts particular status and

woocommerce_order_status_.$this->status._to_.$new_status->slug 

which looks catches things moving 1 specific status , specific status. help?

source: http://docs.woothemes.com/document/hooks/


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -