Last active
August 29, 2015 13:58
-
-
Save corsonr/9969721 to your computer and use it in GitHub Desktop.
WooCommerce - is user a paying customer?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Is the user a paying customer? | |
* | |
* @access public | |
* @return bool | |
*/ | |
function is_paying_customer( $user_id ) { | |
$paying_customer = get_user_meta( $user_id, 'paying_customer', true ); | |
if( $paying_customer != '' && absint( $paying_customer ) > 0) { | |
return true; | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment