• Hi,

    Here is some example code:

    add_action( 'wpcf7_mail_sent', 'custom_wpcf7_mail_sent_function' );
    
    function custom_wpcf7_mail_sent_function( $contact_form ) {
    	$title = $contact_form->title;
    
    	if ( $title == 'Returns' ) {
    		$order = new WC_Order( 39998 );
    		$order->update_status('processing');
    	}
    }

    When running the above code the update_status() method does not trigger the woocommerce_order_status_changed action which subsequently does not trigger a webhook which is set to listen to ‘Order Updated’.

    Thank you for your help!

    https://www.ads-software.com/plugins/contact-form-7/

  • The topic ‘wpcf7_mail_sent with order update_status()’ is closed to new replies.