Home Forums Backend Issues (wp-admin) Cannot update field programmatically Reply To: Cannot update field programmatically

  • @hube2 yes, it’s kind of hard to know what it refers to, my guess is the order ID of the WC order that was just placed.

    I would rule out that your hooked function is being called, try this below the function definition:

    var_dump( $order_id );
    var_dump( $old_status );
    var_dump( $new_status );
    wp_die( var_dump( order ) );

    Do you get any output? (remember to set this in wp-config.php):

    define('WP_DEBUG', true);
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', true);