Repository Forums Support WooCommerce Extended Coupon Features PRO Compatibility with Free Gift Coupons

Topic Resolution: Resolved
Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #2831
    Domin
    Participant

    Hi,
    I am sorry to say that after activate your plugin I experienced strange conflict(?).
    I use Free Gift Coupon plugin. It allows to add free products to product already added to cart.
    I have installed your plugin to make the coupon auto add (just need only this function).

    (I tested your plugin before and it’s working good with standard discount types of woocommerce)

    While using a Free Gift Coupon discount type (discount_type = free_gift) it works strange:
    1. The auto add does not work at all\
    2. After manually applying the proper code there are two info:
    – First: The coupon was applied.
    – But after that there is another info: A gift item which is no longer available was removed from your cart.

    The gift actually is available and when your plugin is off – the manually applying the code is working ok.

    I saw at wp support of the plugin that there was the same problem before but I can not find the answer here.

    I am willing to add an access to my site if you need to inspect the problem.
    Thank you in advance for help.
    Dominik

    #2833
    Soft79
    Keymaster

    Could you use the free product functionality of our plugin instead of using the Free Gift plugin?

    #2839
    Domin
    Participant

    Hi,
    I see that you are not interested in resolving the problem? 🙂

    It won’t be cheaper if I spend money for two different plugins 🙂
    But if you have a discount coupon I would consider this option.

    Regards,
    Dominik

    #2840
    Soft79
    Keymaster

    I assumed you already had our plugin.

    Our plugin thinks the coupon has no value (it doesn’t know about ‘Free Gift’-coupons) and therefore doesn’t apply it automatically. Try pasting this line in functions.php:

    add_filter( 'wjecf_coupon_has_a_value', function( $has_a_value, $coupon ) { return true; }, 10, 2);

    If you can send me the Free Gift plugin to admin at soft79.nl I will try to fix this in the next release.

    #2868
    Domin
    Participant

    Hello,
    Unfortunatelly the code:
    add_filter( 'wjecf_coupon_has_a_value', function( $has_a_value, $coupon) { return true; }, 10, 2);
    does not work.

    I have sent you the plugin to inspect.

    Thank you in advance for fix.

    Regards,
    Dominik

    #2871
    Soft79
    Keymaster

    I did not receive the plugin. Please try using a service like https://www.wetransfer.com .

    #2872
    Domin
    Participant

    I have just sent it via wetransfer then.
    Thank you.
    Dominik

    #2880
    Soft79
    Keymaster

    You told me the snippet did not work. That’s strange, because I just tested it in combination with the ‘Free Gift’-plugin and it does work. Where did you paste the snippet? Did you get any errors?

    #2881
    Domin
    Participant

    Hi,
    I put it to the child theme’s functions.php file.
    Maybe the “child” is the problem?

    DD

    #2882
    Soft79
    Keymaster

    Shouldn’t be an issue. If you just paste die('yes'); below the snippet, do you get a blank page with just the text ‘yes’?

    #2883
    Domin
    Participant

    That’s it! When I put it to the main-theme functions.php it works correctly.
    Is there a way to put this function to the child..?

    #2884
    Soft79
    Keymaster

    Does the functions.php contain <?php ?

    #2885
    Domin
    Participant

    Yes, of course. There is a few working functions…

    Tried also:
    add_action( ‘after_setup_theme’, ‘run_autocode’ );
    function run_autocode() {
    add_filter( ‘wjecf_coupon_has_a_value’, function( $has_a_value, $coupon ) { return true; }, 10, 2);
    }

    But no effect…

    #2886
    Soft79
    Keymaster

    Well, something must be wrong in functions.php of your child theme. For example pasted somewhere where it’s not being executed.

    #2887
    Domin
    Participant

    Sorry! Really sorry!
    I put the function to the wrong theme… :/

    The filter works of course.

    Thank you very much for your time!

    Dominik

Viewing 15 posts - 1 through 15 (of 17 total)
  • You must be logged in to reply to this topic.