• Resolved Joe Jacks

    (@pixeljack)


    Hi,

    I’m looking to create a filter that alters the text displayed at the checkout page depending on whether a user is logged in or not. If not, they are suggested to login in order to qualify for the points.

    PHP isn’t my strong point – this is what I’ve come up with so far but doesn’t work. If someone could point me in the right direction it would be greatly appreciated.

    apply_filters ( 'wc_points_rewards_earn_points_message', $message, $points_earned );
    function points_rewarded_message($message) {
    	if(is_user_logged_in()) {
    		return "Complete your order and earn {points} points for a discount on a future purchase";
    	} else {
    		return"Please login to qualify for your Cavendish Points";
    	}
    }

    Thanks,

    Joe

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    It looks like this is related to WooCommerce Points and Rewards. Please contact us at?WooCommerce.com > My Account > Support. You may need to create an account before you can access that page. Also, include a link to this forum thread, so that we can keep track of what’s already been done. Please kindly note that this particular forum is specifically for assistance with core WooCommerce features.

    laceyrod

    (@laceyrod)

    Automattic Happiness Engineer

    Hi there,

    This thread has been inactive for a bit, so I’m going to mark it as Resolved now for the overall health of the forums. Please feel free to open a new one if you have any further questions.

    Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WC Points & Rewards Filters’ is closed to new replies.