CraigMcKee Posted July 12, 2022 Share Posted July 12, 2022 Hi, I have a checkout page using Wordpress with Woocommerce. It has a checkbox that says "Deliver to another address." I want that to be always selected, which it is at the moment but I do not want users to be able to unselect it. I have hidden the checkbox with css but, the user can click on the text and this toggles the checkbox. This is the code I found which I think refers to it: <h3 id="ship-to-different-address"> <label class="woocommerce-form__label woocommerce-form__label-for-checkbox checkbox"> <input id="ship-to-different-address-checkbox" class="woocommerce-form__input woocommerce-form__input-checkbox input-checkbox" <?php checked( apply_filters( 'woocommerce_ship_to_different_address_checked', 'shipping' === get_option( 'woocommerce_ship_to_destination' ) ? 1 : 0 ), 1 ); ?> type="checkbox" name="ship_to_different_address" value="1" /> <span><?php esc_html_e( 'Property Details', 'woocommerce' ); ?></span> </label> </h3> Can I amend this so either the text isn't clickable or it is just a label and there is no checkbox at all (but the page acts like the checkbox has been selected)? Thank you! Quote Link to comment https://forums.phpfreaks.com/topic/315031-remove-checkbox/ Share on other sites More sharing options...
requinix Posted July 12, 2022 Share Posted July 12, 2022 2 hours ago, CraigMcKee said: It has a checkbox that says "Deliver to another address." I want that to be always selected, which it is at the moment but I do not want users to be able to unselect it. But why? If my billing and shipping addresses are the same then why do I have to type it in again? Quote Link to comment https://forums.phpfreaks.com/topic/315031-remove-checkbox/#findComment-1598156 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.