How to execute init or woocommerce_init only for checkout page

At first I will notice that logging in with the username only sounds like a insecure solution . You should not display the form in the init action hook. Add form display function to the action hook from checkout page (e.g. woocommerce_before_checkout_form) or overwrite the checkout template in the active theme and insert the form … Read more

Adding placeholder text field to woocommerce checkout [closed]

Add the code in your themes functions.php. add_filter( ‘woocommerce_checkout_fields’ , ‘override_billing_checkout_fields’, 20, 1 ); function override_billing_checkout_fields( $fields ) { $fields[‘billing’][‘billing_first_name’][‘placeholder’] = ‘Enter First Name’; $fields[‘billing’][‘billing_last_name’][‘placeholder’] = ‘Enter Last Name’; return $fields; } Solved by adding the code in this way