Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #802483

    Hi There,
    I have a child theme and need to make start an action when an order is set to “processing”. It seems the action does not fire correctly.
    Here is my code below:

    add_action( ‘woocommerce_order_status_processing’, ‘qcmaipr_send_order_to_ext’, 10, 1 );
    function qcmaipr_send_order_to_ext( $order_id ){
    //test the function sending an eMail
    require(‘../../../wp-load.php’);
    wp_mail( (Email address hidden if logged out) ‘, ‘My subject, ‘corder in process’);
    }

    Can you help me?

    #802494

    Correction, here is the code, thete was a “‘” missing :!

    add_action( ‘woocommerce_order_status_processing’, ‘qcmaipr_send_order_to_ext’, 10, 1 );
    function qcmaipr_send_order_to_ext( $order_id ){
    //test the function sending an eMail
    require(‘../../../wp-load.php’);
    wp_mail( (Email address hidden if logged out) ‘, ‘My subject’, ‘corder in process’);
    }

    #803669

    Hi,
    has the “$order_id” been declared in the functions.php?

    Best regards,
    Mike

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.