• Resolved alazawada

    (@alazawada)


    Hi
    Thanks for your plugin. It seems to be what I need, however I have one issue while using this plugin and do not know how to resolve it.

    I have the prices in my WooCommerce shop configured as nett – of course all the taxes are automatically calculated and ultimately the gross prices are shown to the user when the user wants to buy any of the products – including the gift cards.
    Till that moment everything is fine.

    The problem is that when the plugin creates the gift card in the backround its value is set to gross price (instead of nett). Later on, when the user wants to buy something with the coupon, the coupon amount is used as the nett price and the additional tax is added to it.
    This way the user pays for instance 123PLN (100PLN nett+23PLN tax) for the coupon and then is able to buy the product having the 151,29 discount (as 123 PLN gross value of the coupon is treated as the nett price and the tax is added once again)

    What should I do? Is there any setting I’m not aware of? Or maybe there is another way to make it work?

    Best regards
    Alicja

    • This topic was modified 3 years, 11 months ago by alazawada.
    • This topic was modified 3 years, 11 months ago by alazawada.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter alazawada

    (@alazawada)

    Hi,
    In the meantime I accidentaly discovered what caused the problem of additional tax.

    The user is able to use the gift card in 2 ways:
    – using the “Gift Card Code” field provided by your plugin (in the Basket) – this way the additional tax is not added to the card amount (the gross amount is used as the gross discount)
    – using the standard Coupon field (the one provided by Woocommerce)- this way the card amount is used as the nett price (as for the standard coupons functionality) so the additonal tax is added. This way the user gets the bigger discount.

    I do not know if you can fix this as the support fix.
    Unfortunately I cannot control what the user is doing while purchasing.
    I did it accidentaly – so the user can do it too.

    Regards
    Alicja

    • This reply was modified 3 years, 11 months ago by alazawada.
    Plugin Author YITHEMES

    (@yithemes)

    Hello there,

    hope you are doing well! 🙂

    We will add a fix to this issue in the next plugin version avoiding adding gift cards in the coupons form.

    If you need it urgently, we can do a workaround with a custom code.

    What do you think?

    Let us know, please.

    Thread Starter alazawada

    (@alazawada)

    Helo
    Thanks for your answer. That would be great to have it fixed:-)
    If you could give me a custom code and it wouldn’t be a lot of work for you (e.g. a couple of lines) that would be great.
    If the next plugin version will be within a couple of days then that if fine – no snipet would be neccessary then.

    Thank you so much in advance
    Alicja

    Plugin Author YITHEMES

    (@yithemes)

    Hello Alicja,

    Sorry for the late reply.

    At the moment we don’t know when the new version will be available, so here you have the code you need to add to the functions.php of your active theme to disable the option to enter the gift card codes in the coupons forms.

    if(!function_exists('ywgc_remove_action')) {
        function ywgc_remove_action() {
            $class = YITH_YWGC_Cart_Checkout::get_instance();
    	    remove_action( 'init', array( $class, 'ywgc_apply_gift_card_on_coupon_form' ) );
        }
        add_action('init', 'ywgc_remove_action');
    }

    Could you check it and let us know, please?

    Thread Starter alazawada

    (@alazawada)

    Hi
    Thanks for the snippet.
    I put it into functions.php file located in my theme folder and unfortunately it does not work. – neither on the cart page nor on the checkout page.
    Can you advise sth?

    Regards
    Alicja

    Plugin Author YITHEMES

    (@yithemes)

    Hi there,

    Sorry for the issue, could you replace the previous code with this new one, please?

    if(!function_exists('ywgc_remove_action')) {
    	function ywgc_remove_action() {
    		$class = YITH_YWGC_Cart_Checkout::get_instance();
    		remove_filter( 'woocommerce_get_shop_coupon_data', array( $class, 'verify_coupon_code' ), 10, 2 );
    	}
    	add_action('init', 'ywgc_remove_action');
    }

    Now it should work properly.

    Let us know any news, please.

    Plugin Author YITHEMES

    (@yithemes)

    Hello there,

    We hope you’re doing well 🙂

    We are setting this topic to solved for now as we have no more news from you, but please feel free to open a new one at any time to receive additional support on this issue.

    Have a good day.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[NSFW] GiftCard amount is created incorrectly when’ is closed to new replies.