skip to Main Content

In WooCommerce login/registration page, I try to add a statement “Ask for help” under the login/registration form next to “Forget password?”

To let the unregistered user go easily to the “Contact Us” when pressing on this statement.

2

Answers


  1. I guess you could insert an echo. Something like this if you can locate the position on PHP when your form happens:

    echo "<p><a href='contactus.html'>Ask for help</a></p>";
    

    It’s hard without seeing the code though. Maybe you can have access to the html form and can edit it from there.

    Login or Signup to reply.
  2. This will add the link in the appropriate places where Woocommerce provides action hooks:

    add_action('woocommerce_login_form_end', 'custom_woocommerce_help_link_action');
    add_action('woocommerce_after_lost_password_form', 'custom_woocommerce_help_link_action');
    function custom_woocommerce_help_link_action() {
        echo '<p class="ask-help"><a href="http://localhost/ask-help">Ask for help</a></p>';
    }
    

    Obviously change the link URL to suit and style the paragraph as needed.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search