• How to disable the points when a user use a coupon? I can see the option for sale price but not for coupons

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Salvatore Strano

    (@salvostrano)

    Hi @omarcp
    The plugin allow to avoid to earn points if the customer use a coupon.

    Thread Starter omarcp

    (@omarcp)

    Can you tell me where is that option?

    Plugin Support Salvatore Strano

    (@salvostrano)

    Hi @omarcp
    You can find this option in YITH->Points And Rewards->Point Settings

    Thread Starter omarcp

    (@omarcp)

    there is not such option there, it is supposed to be the one that says “on sale”?

    Plugin Support Emanuela Castorina

    (@kreamweb)

    It is not possible remove the option to earn point if a coupon is applied.
    But inside YITH->Points And Rewards->Point Settings you can find the option

    “Remove points when coupons are used”

    If it is “ON” it possible remove the amount of the discount from the total of points gained.

    Thread Starter omarcp

    (@omarcp)

    Is there a code snippet to make yith points do not earn point if any coupon is used?

    Thread Starter omarcp

    (@omarcp)

    We need to find a way to stop earning points when a coupon is being used.

    It looks like the plugin don’t allow to avoid to earn points if the customer use a coupon as Salvatore Strano (@salvostrano) said.

    Plugin Support Emanuela Castorina

    (@kreamweb)

    Hello,
    you can use this snippet that you can add inside the file functions.php of your theme:

    add_filter('ywpar_calculate_points_on_cart', 'ywpar_check_coupons');
    function ywpar_check_coupons( $points ){
    	if( ! WC()->cart ){
    		return $$points;
    	}
    	$coupon_applied = WC()->cart->get_applied_coupons();
    	return count( $coupon_applied) > 0 ? 0 : $points;
    }
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Do not assign points when a coupon is used’ is closed to new replies.