• Resolved roghithsam

    (@roghithsam)


    this code not work

    add_filter('woocommerce_order_is_paid_statuses', 'woocommerce_order_is_paid_statuses_callback');
    
    if(!function_exists('woocommerce_order_is_paid_statuses_callback')){
        function woocommerce_order_is_paid_statuses_callback(){
            return array( 'completed' );
        }
    }
Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Subrata Mal

    (@subratamal)

    @roghithsam Where did you put that code?

    Thread Starter roghithsam

    (@roghithsam)

    @subratamal in theme/functions.php file

    Plugin Author Subrata Mal

    (@subratamal)

    @roghithsam This code should work because it is working at our end. Please check if there is any theme or plugin conflict also please try the updated code.

    add_filter('woocommerce_order_is_paid_statuses', 'woocommerce_order_is_paid_statuses_callback', 9999);
    
    if(!function_exists('woocommerce_order_is_paid_statuses_callback')){
        function woocommerce_order_is_paid_statuses_callback(){
            return array( 'completed' );
        }
    }
    Thread Starter roghithsam

    (@roghithsam)

    add_filter('woocommerce_order_is_paid_statuses', 'woocommerce_order_is_paid_statuses_callback', 9999);
    
    if(!function_exists('woocommerce_order_is_paid_statuses_callback')){
        function woocommerce_order_is_paid_statuses_callback(){
            return array( 'completed' );
        }
    }

    this code not worked.
    installed plugins: woo-commerce, woo wallet only no plugin or theme conflict.

    if the new customer processed to payment and canceled the order and the order failed or cancelled status referred users get the referral amount

    Plugin Author Subrata Mal

    (@subratamal)

    @roghithsam If once the order gets completed and then canceled then also the referral bonus will be credited. You have to manually deduct the referral amount from the user wallet in that case.

    Thread Starter roghithsam

    (@roghithsam)

    @subratamal
    no, money credited before the order status completely.

    Try this you can understand what I say.
    create a new account with a referral link and money to wallet greater than the fixed referral amount and process the checkout, fill the billing details and click to proceed
    it redirect to the payment page (but you do not make the payment) cancel the payment and go to woocommerce my account – > orders the wallet top-up in pending payment status cancel that order
    now check your referred account the referral amount is creditd to the user

    Thread Starter roghithsam

    (@roghithsam)

    @subratamal
    did you understand what I said?

    Plugin Author Subrata Mal

    (@subratamal)

    @roghithsam Sorry for the delay in response. Yes, you are right there was a bug in our referral system we have fixed that and will be uploaded in our next update. For now, you can download the updated plugin from our GitHub repo https://github.com/malsubrata/woo-wallet

    Thread Starter roghithsam

    (@roghithsam)

    ok, Thank You For Your Support

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Referral credit after order completed (not work)’ is closed to new replies.