status rules used for backorders

Forums Order Status Rules for WooCommerce status rules used for backorders

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #120388
    Moshtafizur
    Participant

    Hi there,

    Thanks for reaching out.

    I have escalated this with our development team. They will get back to you as soon as they can.

    Kind regards,
    Moshtafizur

    #120635
    Tom Anbinder
    Moderator
    Plugin Support

    Hi, Lukasz,

    Sorry for not getting back to you sooner.

    I think this should save us from an infinite loop:

    add_filter( 'alg_wc_order_status_rules_do_apply_rule', function( $do_apply, $order, $rule_id, $args ) {
        if ( 1 == $rule_id && $do_apply ) {
            if ( 'backorder' === $args['last_record']['from'] ) {
                return false;
            }
        }
        return $do_apply;
    }, 10, 4 );

    As for your snippet for “… stock higher than 0…” – yes, it looks fine.

    Please let me know what you think.

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