Skip to content

Instantly share code, notes, and snippets.

@kreamweb
Created July 18, 2017 08:13
Show Gist options
  • Select an option

  • Save kreamweb/91385e2bd26e6ac616b889f6f3a626ab to your computer and use it in GitHub Desktop.

Select an option

Save kreamweb/91385e2bd26e6ac616b889f6f3a626ab to your computer and use it in GitHub Desktop.
This code hide the messages to all user that can't earn points.
<?php
if( ! function_exists('YITH_WC_Points_Rewards') ){
add_filter('ywpar_hide_messages', 'ywpar_hide_messages' );
function ywpar_hide_messages( $result ){
if ( ! YITH_WC_Points_Rewards()->is_user_enabled( ) ) {
$result = true;
}
return $result;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment