Advertisement
wpgenie

custom login link

Jun 27th, 2022
819
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.51 KB | None
  1. /* change login link to go custom link and not to /my-account/ */
  2.  
  3. function my_woocommerce_notice_link( $message ) {
  4.  
  5.   if ( strpos( $message, 'Sorry, you must be logged in to place a bid. <a href="https://your-webpage.com/my-account/" class="button">Login &rarr;</a>' ) !== false ) {
  6.     $message = 'Sorry, you must be logged in to place a bid. <a href="https://your-webpage.com/login/" class="button">Login &rarr;</a>';
  7.   }
  8.   return $message;
  9. }
  10. add_filter( 'woocommerce_add_error', 'my_woocommerce_notice_link' );
Advertisement
RAW Paste Data Copied
Advertisement