• Resolved bilal266

    (@bilal266)


    Hi, i am using this plugin but i want to redeem or use the current balance in my wallet for specific categories products.Other than these categories this plugin should not allow the customer to use wallet amount.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Subrata Mal

    (@subratamal)

    Hi @bilal266

    Thanks for reaching out to our support forum. Yes this is possible but you have to do some custom coding. Please reach out to us at [email protected] for extended support because support here is limited.

    Thank you.

    Thread Starter bilal266

    (@bilal266)

    Hi bro,
    I have emailed you, could you please let me how i can do this?

    This is exactly what I need to do as well. I just made a thread about it not seeing this one. @bilal266 did you come up with a solution?

    Thread Starter bilal266

    (@bilal266)

    Hello bro,

    @acpaulley I didn’t get the solution yet.

    but i think this function could help….
    function filter_woocommerce_available_payment_gateways( $available_gateways ) {
    global $woocommerce;
    $unset = false;
    $category_ids = array( 8, 37 );
    foreach ( $woocommerce->cart->cart_contents as $key => $values ) {
    $terms = get_the_terms( $values[‘product_id’], ‘product_cat’ );
    foreach ( $terms as $term ) {
    if ( in_array( $term->term_id, $category_ids ) ) {
    $unset = true;
    break;
    }
    }
    }
    if ( $unset == true ) unset( $available_gateways[‘cheque’] );
    return $available_gateways;
    };

    // add the filter
    add_filter( ‘woocommerce_available_payment_gateways’, ‘filter_woocommerce_available_payment_gateways’, 10, 1 );

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Cashback amount can be redeemed for specific category’ is closed to new replies.