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
| /* This is to be used in conjuction with the following gist - https://gist.github.com/travislima/6f1d45d3ff236cda4e0d8d871adc8d9b */ | |
| .pmpro_checkout-field-username , | |
| .pmpro_checkout-field-password , | |
| .pmpro_checkout-field-password2 { | |
| display: none; | |
| } |
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
| <?php | |
| /** | |
| * This will generate information for username, password and password 2. This is great for free levels. | |
| * Adjust the $generate_data_level ID's to allow data generation for specific levels. | |
| * Use CSS to hide these fields on the checkout page from the frontend. | |
| * Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ | |
| // Function to make fields optional for free levels. | |
| function my_generate_fields_for_users() { |
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
| <?php | |
| /** | |
| * Load content for specific pages, checkout or confirmation page | |
| * Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ | |
| function load_my_script_for_pmpro() { | |
| global $pmpro_pages; | |
| if ( is_page( $pmpro_pages['checkout'] ) || is_page( $pmpro_pages['confirmation'] ) || is_page( $pmpro_pages['account'] ) || is_page( $pmpro_pages['billing'] ) || is_page( $pmpro_pages['cancel'] ) || is_page( $pmpro_pages['invoice'] ) || is_page( $pmpro_pages['levels'] ) || is_page( $pmpro_pages['popup-cvv'] ) ) { | |
| ?> |
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
| <?php | |
| /** | |
| * This will add Shipping Address information when an admin view's the user's order in the WordPress dashboard. | |
| * Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ | |
| function my_pmpro_add_shipping_address_to_admin_order_view( $order ) { | |
| $user_id = $order->user_id; |
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
| <?php | |
| /** | |
| * Add the following code below to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations | |
| * In this example you will learn how to add 3 checkboxes to Paid Memberships Pro Checkout page. | |
| */ | |
| function rh_fields_example_checkbox() | |
| { | |
| //don't break if Register Helper is not loaded |
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
| <?php | |
| /** | |
| * This will only allow users to checkout with specific zip codes for the Shipping Add On for Paid Memberships Pro. | |
| * You will need to use this code recipe together with the PMPro Shipping Address Add On - https://www.paidmembershipspro.com/add-ons/shipping-address-membership-checkout/ | |
| * Add the code below to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ | |
| function my_pmpro_valid_zip_codes( $pmpro_continue_registration ) { |
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
| <?php | |
| function my_pmprorh_init() | |
| { | |
| //don't break if Register Helper is not loaded | |
| if(!function_exists( 'pmprorh_add_registration_field' )) { | |
| return false; | |
| } | |
| //define the fields |
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
| <?php //Do not copy this tag. | |
| /** | |
| * Add custom fields to Paid Memberships Pro checkout page. | |
| * Must have PMPro & Register Helper Add On installed and activated to work. | |
| * Add this code to a PMPro Customizations Plugin or Code Snippets plugin. | |
| */ | |
| function pmpro_add_fields_to_checkout(){ | |
| //don't break if Register Helper is not loaded |
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
| <?php //Do not copy this tag. | |
| /** | |
| * Add custom fields to Paid Memberships Pro checkout page. | |
| * Must have PMPro & Register Helper Add On installed and activated to work. | |
| * Add this code to a PMPro Customizations Plugin or Code Snippets plugin. | |
| */ | |
| function pmpro_add_fields_to_checkout(){ | |
| //don't break if Register Helper is not loaded |
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
| <?php //Do not copy this tag to your PMPro Customizations Plugin. | |
| /** | |
| * Adds custom fields to Paid Memberships Pro checkout page. | |
| * Requires Paid Memberships Pro and the PMPro Register Helper Add On. | |
| * Add this code to a PMPro Customizations Plugin or the Code Snippets plugin. | |
| */ | |
| function pmpro_add_fields_to_checkout(){ | |
| //don't break if Register Helper is not loaded |