Skip to content

Instantly share code, notes, and snippets.

@corsonr
Last active August 29, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save corsonr/9969721 to your computer and use it in GitHub Desktop.
Save corsonr/9969721 to your computer and use it in GitHub Desktop.
WooCommerce - is user a paying customer?
<?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