add_filter( ‘manage_users_columns’, ‘reorder_user_columns’, 20 ); function reorder_user_columns( $columns ) { // Initialize a new columns array $new_columns = array(); // Add the checkbox column first, if it exists if (isset($columns[‘cb’])) { $new_columns[‘cb’] = $columns[‘cb’]; } // Reorder or add custom…Continue reading
function change_expired_membership_to_level_one($level_id, $user_id, $cancel_level) { // Check if the bypass flag is set if (get_user_meta($user_id, ‘bypass_expiration’, true) == ‘yes’) { // Reset the flag update_user_meta($user_id, ‘bypass_expiration’, ‘no’); return; // Exit the function to avoid changing the membership level } if…Continue reading
function my_pmpro_remove_cancel_link( $pmpro_member_action_links ) { unset( $pmpro_member_action_links[‘cancel’] ); unset( $pmpro_member_action_links[‘change’] ); return $pmpro_member_action_links; } add_filter( ‘pmpro_member_action_links’, ‘my_pmpro_remove_cancel_link’ );Continue reading
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
function my_pmpro_change_default_button_text() { ?>Continue reading
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
/** * Filter to exclude Level 1 members from PMPro Members List * * @param string $sql The original SQL query for fetching members. * @return string The modified SQL query excluding Level 1 members. */ function cody_exclude_level_1_from_pmpro_members_list($sql) { //…Continue reading
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
/** * 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
function my_custom_pmpro_level_cost_spacing() { ?>Continue reading