Hide prices – fix code for custom wp-member registration
-
I used this code to hide prices unless a member is registered and logged in:
add_filter('woocommerce_get_price_html','members_only_price'); function members_only_price($price){ if(is_user_logged_in() ){ return $price; } else return '<a href="' .get_permalink(woocommerce_get_page_id('myaccount')). '">Login</a> or <a href="'.site_url('/wp-login.php?action=register&redirect_to=' . get_permalink()).'">Register</a> to see price!'; }
It works great; however, I made a custom registration form using the wp-members plugin. The registration php code (as shown above) isn’t linking to the correct wp-members registration form. How do I change it? I tried changing wp-login.php to wp-members-login.php but get an Error 404 message.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Hide prices – fix code for custom wp-member registration’ is closed to new replies.