Change the PayPal button image

function my_pmpro_paypal_button_image( $url ) { // Your custom PayPal button image URL return ‘https://paidmembershipspro.com/images/paypal_button_custom.png’; } add_filter( ‘pmpro_paypal_button_image’, ‘my_pmpro_paypal_button_image’ ); function my_custom_pmpro_button_styles() { ?>Continue reading

hide_discount_code_field_for_specific_levels

function hide_discount_code_field_for_specific_levels($show) { global $pmpro_level; if( in_array( $pmpro_level->id, array(1,2,3,4,5,6) ) ) { $show = false; } return $show; } add_filter(‘pmpro_show_discount_code’, ‘hide_discount_code_field_for_specific_levels’);Continue reading

check_user_role_and_redirect to 2 different url address 1

function check_user_role_and_redirect() { // Check if the user is logged in if ( is_user_logged_in() ) { // Get current user info $user = wp_get_current_user(); // Define the URLs for redirection $facebook_group_url = ‘https://www.facebook.com/groups/fs22westend64x’; $another_page_url = ‘https://levismodding.co.uk/membership-account/membership-checkout/?level=3’; // Check user roles…Continue reading

my_pmpro_confirmation_url

/** * Redirect Members to a Unique Confirmation Page Based on Membership Level * * title: Redirect Members to a Unique Confirmation Page Based on Membership Level * layout: snippet * collection: checkout * category: confirmation * * You can…Continue reading

remove_unwanted_user_contact_methods

function remove_unwanted_user_contact_methods($contactmethods) { $fields_to_remove = [ ‘facebook’, ‘twitter’, ‘linkedin’, ‘dribbble’, ‘instagram’, ‘pinterest’, ‘wordpress’, ‘github’, ‘medium’, ‘youtube’, ‘vimeo’, ‘vkontakte’, ‘odnoklassniki’, ‘tiktok’, ‘mastodon’, ‘user_url’ // Also remove the website field ]; foreach ($fields_to_remove as $field) { unset($contactmethods[$field]); } return $contactmethods; } add_filter(‘user_contactmethods’,…Continue reading

custom_admin_colors_on_user_profiles

function custom_admin_colors_on_user_profiles() { $screen = get_current_screen(); if ($screen->base === ‘profile’) { add_action(‘admin_head’, function() { echo ‘ ‘; }); } } add_action(‘current_screen’, ‘custom_admin_colors_on_user_profiles’);Continue reading