skip to Main Content

How to disable fields that are pre-filled in WooCommerce checkout?

I would like to prevent (make these fields readonly, for example) users from changing their billing information on the WooCommerce checkout form. I'm currently using this code snippet: add_filter('woocommerce_billing_fields', 'mycustom_woocommerce_billing_fields', 10, 1 ); function mycustom_woocommerce_billing_fields($fields) { $fields['billing_first_name']['custom_attributes'] = array('readonly'=>'readonly'); $fields['billing_last_name']['custom_attributes']…

VIEW QUESTION

Need to Change Sale Badge Text in WooCommerce

The following works for the Product page but it does not work for the Shop page. <?php add_filter('woocommerce_sale_flash', 'woocommerce_custom_sale_text', 10, 3); function woocommerce_custom_sale_text($text, $post, $_product) { return '<span class="onsale">PUT YOUR TEXT</span>'; } Please suggest modifications. Thanks!

VIEW QUESTION
Back To Top
Search