Created
June 13, 2020 13:04
-
-
Save MrVibe/38ea49ddaf8df84db0f152370b8c67a6 to your computer and use it in GitHub Desktop.
Paid Custom Registration form, lets say product id XX
This file contains hidden or 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
add_filter('wplms_registration_form_submit_button',function($return){ | |
if(is_user_logged_in()){ | |
$check = wc_customer_bought_product('',get_current_user_id(),XX); | |
if($check){ | |
return $return; | |
} | |
} | |
return '<a href="'.get_permalink(XX).'">Purchase Membership $99</a>'; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment