Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #18456
    celian
    Participant

    In v3.2.8, BOGO coupon seems to not work due to an undefined variable on line 612 in /woocommerce-auto-added-coupons-pro/pro/plugins/WJECF_Pro_Free_Products/WJECF_Pro_Free_Products.php

    the variable $quantity should be $qty.

    Orignal code :
    //Merge bogos with the free_product_ids array
    foreach ( $bogo_product_ids as $product_id => $qty ) {
    if ( isset( $free_product_ids[ $product_id ] ) ) {
    $free_products[ $product_id ][‘quantity’] += $quantity;
    } else {
    $free_products[ $product_id ] = [
    ‘quantity’ => $quantity,
    ‘variation’ => []
    ];
    }
    }

    Fixed code :
    //Merge bogos with the free_product_ids array
    foreach ( $bogo_product_ids as $product_id => $qty ) {
    if ( isset( $free_product_ids[ $product_id ] ) ) {
    $free_products[ $product_id ][‘quantity’] += $qty;
    } else {
    $free_products[ $product_id ] = [
    ‘quantity’ => $qty,
    ‘variation’ => []
    ];
    }
    }

    #18460
    Soft79
    Keymaster

    How silly of us. Thanks for letting us know! We will release a fix soon.

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