SOFTWARE DEVELOPER
📧 [email protected]
🔗 GitHub
🔗 Stack Overflow
SOFTWARE DEVELOPER
📧 [email protected]
🔗 GitHub
🔗 Stack Overflow
| <?php // do not copy this line. | |
| /** | |
| * This recipe allow or deny the checkout of a level to certain countries. | |
| * Modify $restriction_mode to use 'deny' or 'allow'. Modify $restricted_countries using level ids as keys and country codes as values. | |
| * | |
| * You can add this recipe to your site by creating a custom plugin | |
| * or using the Code Snippets plugin available for free in the WordPress repository. | |
| * Read this companion article for step-by-step directions on either method. | |
| * https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ |
| <?php // do not copy this line. | |
| /** | |
| * This recipe does will change the price for a membership by the date | |
| * | |
| * You can add this recipe to your site by creating a custom plugin | |
| * or using the Code Snippets plugin available for free in the WordPress repository. | |
| * Read this companion article for step-by-step directions on either method. | |
| * https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ | |
| function pmpro_checkout_sale_price( $level ) { |
| <?php | |
| /** | |
| * Custom function to add custom sql search where clause to the member directory search query | |
| * | |
| * You can add this recipe to your site by creating a custom plugin | |
| * or using the Code Snippets plugin available for free in the WordPress repository. | |
| * Read this companion article for step-by-step directions on either method. | |
| * https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ |
| <?php | |
| function pmpro_custom_filter_checkout_levels( $pmpro_level ) { | |
| // get the current user | |
| $user = wp_get_current_user(); | |
| // if the user is logged in | |
| if ( $user->ID ) { | |
| // get the user's membership level |
| <?php | |
| /** | |
| * This recipe fix an Approvals Add On bug by removing Add On filter and adding a custom one | |
| * | |
| * You can add this recipe to your site by creating a custom plugin | |
| * or using the Code Snippets plugin available for free in the WordPress repository. | |
| * Read this companion article for step-by-step directions on either method. | |
| * https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ |
| <?php | |
| $member_number = base_convert( $hex_value, 16, 10 ); | |
| ?> |
| <?php | |
| /** | |
| * Remove stripe webhook setup notice | |
| * | |
| * Add this code to your site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ | |
| add_action('admin_init', 'remove_pmpro_gateway_stripe_notice'); | |
| function remove_pmpro_gateway_stripe_notice() { | |
| remove_action( 'admin_notices', array( 'PMProGateway_stripe', 'show_stripe_webhook_setup_notice' ) ); | |
| } |
| <?php | |
| /** | |
| * This recipe bring Order billing info phone number into profile page. | |
| * | |
| * You can add this recipe to your site by creating a custom plugin | |
| * or using the Code Snippets plugin available for free in the WordPress repository. | |
| * Read this companion article for step-by-step directions on either method. | |
| * https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ |