• hassan0a

    (@hassan0a)


    Hi,

    I am trying to prevent specific users from receiving cashback, but they can use wallet and recharge it normally, So How to do that?

    Thanks

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

    (@subratamal)

    @hassan0a For this we have to write custom code. For commercial support please reach here https://standalonetech.com/forum/terawallet/

    Thread Starter hassan0a

    (@hassan0a)

    I can’t pay for commercial support, specially I’m starting my project I tried this code as most of them are in shop_manager, so I’ll prevent all role from receiving cashback, BUT it’s not working with the latest WordPress and WooCommerce,

    add_filter('woo_wallet_form_cart_cashback_amount', 'woo_wallet_form_cart_cashback_amount_callback');
    if (!function_exists('woo_wallet_form_cart_cashback_amount_callback')) {

    function woo_wallet_form_cart_cashback_amount_callback($cashback_amount) {
    $user = wp_get_current_user();
    if (in_array('shop_manager', (array) $user->roles)) {
    $cashback_amount = 0;
    }
    return $cashback_amount;
    }

    }

    Could you fix this code?

    Thread Starter hassan0a

    (@hassan0a)

    Any help here?

    Thread Starter hassan0a

    (@hassan0a)

    Any help here?

    Thread Starter hassan0a

    (@hassan0a)

    Hello, Any help here?

    Thread Starter hassan0a

    (@hassan0a)

    How dare you mark it as resolved without resolving it?

    Shame on you

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