Repository › Forums › Support › WooCommerce Extended Coupon Features PRO › Compatibility with Free Gift Coupons
- This topic has 16 replies, 2 voices, and was last updated 6 years, 5 months ago by Soft79.
-
AuthorPosts
-
March 21, 2018 at 1:27 pm #2831DominParticipant
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.
DominikMarch 21, 2018 at 4:44 pm #2833Soft79KeymasterCould you use the free product functionality of our plugin instead of using the Free Gift plugin?
March 23, 2018 at 2:58 pm #2839DominParticipantHi,
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,
DominikMarch 23, 2018 at 3:07 pm #2840Soft79KeymasterI 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.
March 27, 2018 at 1:38 pm #2868DominParticipantHello,
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,
DominikMarch 28, 2018 at 7:39 am #2871Soft79KeymasterI did not receive the plugin. Please try using a service like https://www.wetransfer.com .
March 28, 2018 at 11:40 am #2872DominParticipantI have just sent it via wetransfer then.
Thank you.
DominikMarch 29, 2018 at 2:18 pm #2880Soft79KeymasterYou 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?
March 29, 2018 at 3:47 pm #2881DominParticipantHi,
I put it to the child theme’s functions.php file.
Maybe the “child” is the problem?DD
March 29, 2018 at 3:51 pm #2882Soft79KeymasterShouldn’t be an issue. If you just paste
die('yes');
below the snippet, do you get a blank page with just the text ‘yes’?March 29, 2018 at 3:56 pm #2883DominParticipantThat’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..?March 29, 2018 at 3:59 pm #2884Soft79KeymasterDoes the functions.php contain
<?php
?March 29, 2018 at 4:08 pm #2885DominParticipantYes, 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…
March 29, 2018 at 4:10 pm #2886Soft79KeymasterWell, something must be wrong in functions.php of your child theme. For example pasted somewhere where it’s not being executed.
March 29, 2018 at 4:30 pm #2887DominParticipantSorry! Really sorry!
I put the function to the wrong theme… :/The filter works of course.
Thank you very much for your time!
Dominik
-
AuthorPosts
- You must be logged in to reply to this topic.