Where to change checkout warning if insufficient points in account

Home Forums How-to Questions Where to change checkout warning if insufficient points in account

This topic contains 4 replies, has 3 voices, and was last updated by  Willem 2 months, 1 week ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #10764

    Michael Hamilton

    When attempting to check out with a cart that needs more points than a user has, the error message is “Sorry, it seems that there are no available payment methods for your state. Please contact us if you require assistance or wish to make alternate arrangements”

    Where can this be edited to be more accurate/descriptive?

    Would be great if MyCred had an easy-to-configure option to override this default (and confusing) message to, “Sorry, you only have XX,XXX points in your account” perhaps followed with an option to “click here to buy more points” etc.

    #10782

    WPExperts

    Hi Michael.

    Yes, when you only have myCRED gateway enabled and a user does not have points then the gateway will not show up which will cause WooCommerce to think no gateway is enabled.

    You basically have two options:

    1) Add in a code snippet to always show the myCRED gateway. Even if the gateway shows up, it will still not accept payment if a user can not afford it.

    add_action( 'mycred_init', 'always_show_mycred_checkout_in_woo', 50 );
    function always_show_mycred_checkout_in_woo() {
    	remove_filter( 'woocommerce_available_payment_gateways', 'mycred_woo_available_gateways' );
    }
    

    2) Adjust your WooCommerce Theme files and insert a custom message that shows when no gateways exists. If your theme supports WooCommerce out of the box, then you should have a folder in your theme called “woocommerce”. The message you see is displayed in the form-pay.php file which is located in: yourtheme/woocommerce/checkout/ folder.

    #10785

    Michael Hamilton

    Although I think Option 2 sounds like a better plan in my scenario, exactly where would Option 1 code snippet go?

    Thanks a bunch. MyCred has turned out to be terrific for our project and we’re looking forward to seeing it evolve.

    #10795

    WPExperts

    Option one goes into your theme’s functions.php file or if you are using a child theme, your child theme’s functions.php file (not both).

    #36901

    Willem

    This worked perfect Thanks WPExperts

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Spin to win points ?
Kindly get back to your previous orientation view... your wheel is rolling there...

Do you really like this awesome addon and wanna use on your site? click here to get it now ?
myCRED Fortune Wheel special offer unlocked!
You have a chance to win free tokens. Are you feeling lucky? Give it a spin.
* You can spin the wheel only once in a month.
* You can spin again any time by paying 500 points
* Once you pay for spin you are not able to refund it.
You must login to play mycred fortune wheel
11