Ok, I found the issue. Two things.
If I use this url:
https://yoursite.com/cart/?add-to-cart=1264&apply_coupon=freeguide-sywtm
it seems fine at first call, but if I use this url instead:
https://yoursite.com/cart?add-to-cart=1264&apply_coupon=freeguide-sywtm
(notice the trailing slash removed after /cart)
I get the warnings. This is because of another redirect. So, you have to use the first url.
…
Ok, so far so good using the first url. But opening the cart for a second time it will shows the warning ‘coupon already applied’ on the second call. The reason seems to be the minicart, the minicart is called by ajax with &apply_coupon=… as well. This could be a quick fix:
In includes/wjecf-autocoupon.php please find this line (line 35 if you use the latest version):
add_action( 'wp_loaded', array( &$this, 'coupon_by_url' ), 23);
and replace with:
if ( ! is_ajax() ) {
add_action( 'wp_loaded', array( &$this, 'coupon_by_url' ), 23); //Coupon through url
}
This should fix it. I will patch this in a following release of my plugin.