chriscct7

Limit EDD Product to 1 purchase

Feb 9th, 2013
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.37 KB | None | 0 0
  1. add_filter( 'edd_purchase_download_form','has_already_purchased', 10, 2 );
  2.  
  3. has_already_purchased($purchase_form, $args){
  4. global $user_ID;
  5. if ( edd_has_user_purchased( $user_ID, $args['download_id'] ) ) {
  6. return<p class=”edd_has_purchased”>. __( ‘You have already purchased this item, but you may purchase it again., ‘edd’ ) .</p>;
  7.  
  8. }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment