Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm in the process of trying to style a checkout page in Woocommerce and need the login form to be visible all the time when the user is not logged in rather than initially hidden then toggled on and off.

What I have discovered is that the login form is generated by Woocommerce's woocommerce_login_form function and then hidden on document load by checkout.js on line 83 $('p.password, form.login, .checkout_coupon, div.shipping_address').hide();. Since this is a core file of Woocommerce and will be overwritten on update I don't want to edit that one line of code but I cannot seem to find any better way of preventing it from hiding the login form. Since this occurs after my own Javascript files I cannot even simply show the form again.

Are there any better ways I can try and prevent the form from being hidden?

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

If you use a custom theme, you can create your own shop/form-login.php, and Woocommerce will use that. Then you can change the class names or add custom JavaScript. Upgrades for the core are still possible.

share|improve this answer
    
Thanks that solved my problem. –  James O'Neill Apr 23 '13 at 14:41
add comment

About the themeing, it's easy to override as @toscho said

About js file, you can easily denqueue the on your functions.php and enqueue your copy of the js file and then customize it to your liking and make sure it will not be over written on wc updates.

share|improve this answer
    
Can you please add examples to demonstrate how you would do these things? –  s_ha_dum May 19 '13 at 22:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.