Try it
add_filter('woocommerce_billing_fields', 'custom_woocommerce_billing_fields');
function custom_woocommerce_billing_fields($fields)
{
$fields['billing_options'] = array(
'label' => __('Ordering Method', 'woocommerce'), // Add custom field label
'placeholder' => _x('Your NIF here....', 'placeholder', 'woocommerce'), // Add custom field placeholder
'required' => true, // if field is required or not
'clear' => false, // add clear or not
'type' => 'radio', // add field type
'class' => array('form-group'), // add class name
'options' => array(
'privato_cittadino' => 'Privato cittadino',
'azienda_professionista' => 'Azienda o libero professionista',
),
);
Related Posts:
- How to check if a plugin (WooCommerce) is active?
- How to trigger WooCommerce order complete email?
- How to get Woocommerce order product info
- Woocommerce auto cancel On-Hold after X days
- The values of custom fields are not available functions.php
- Use wc_enqueue_js only on specific pages – nested add_action
- Replace existing content from specific WooCommerce admin orders list column
- Woocommerce – How to get products which have a sale between 20% to 40%? [closed]
- Display related products with custom output
- Add attribute / custom attribute to product in woocommerce
- Use is_product_category() properly
- Changing Woocommerce flat rate every nth number of items
- How to select WooCommerce products by post_meta and order them
- write custom woocommerce templates and forms
- combine Code 1 with Code 2
- WooCommerce – Email admin with new user details
- Adding nofollow to a PHP generated Nav
- Issue adding sub category programmatically
- Show prices with tax in Woocommerce Mini Cart [closed]
- Problem with custom plugin using AJAX to pull info from php file
- Auto-update products after they were published – Woocommerce
- How to VAR_DUMP a $variable during checkout process (Is my product meta callable?)
- Which field should I edit to make the checkbox marked by default?
- Is it possible to intercept all ajax requests and get the parameters and the returns?
- wordpress + woocommerce display product with additional information [closed]
- Function works when I don’t login to WordPress but when I login then it doesn’t work
- How to make products with no cost in WooCommerce
- Incorrect amount of posts returned when filtering related Woo products by custom taxonomy
- How to remove woocommerce_breadcrumb() from do_action( ‘woocommerce_before_main_content’ ); [closed]
- Add post with approval by the admin
- How to remove coupon dropdown feature
- Woocommerce display one random product via php
- Change product_base programmatically
- Add html link in functions.php files of the theme
- How to optimize update_post_meta?
- Seo Friendly Filter URLs
- customize woocommerce templates and display store on home
- WC_Customer delete function returns error
- how can i add class or span tag at sprintf?
- CSS change in woo commerce Place Order Text [closed]
- WooCommerce – Moving Product Price to the Left of Add to Cart Button [closed]
- Exclude product attributes from taxonomy terms loop
- WP All Import / Update stock quantity from multiple XML files
- Woocommerce: remove total sum from new order’s email [closed]
- Alter Woocommerce product archive structure
- Have Woocommerce show product price if id, when not logged in
- custom post type with role Vendor
- WooCommerce: Display product categories to make IF statement
- Custom reduce stock code affecting date_modified – How to bypass?
- Modify WooCommerce used to get all orders in dashboard
- Replace category title with category description in woocommerce
- Add Custom Category Description When Empty
- I am having issue in divi woocomerce checkout module. (DIVI theme)
- Add a product category to a specific product via a button
- Woocommerce display orders with products from specific categories to specific admins
- Display div if category has a specific parent
- How to add a shortcode which runs a .php file for the current post
- global $product is empty string when passed into function
- Variant Item SKU as Product Code
- Use PHP Class in WordPress functions
- How can I change the background color of divs dynamically (depending on an order-status in woocommerce)?
- Add a new view on the Woocommerce account page
- Don’t update modified post date when user add a product review or comment?
- How do I change the “login” label in My Account page to “Registered Customer”
- Customize the “Available for back order” text for specific variation
- How to remove the replace the product image by video on shop page conditionally
- How to get content on a blank basket/cart page in a custom theme with woocommerce
- WooCommerce REST API AJAX Auth – 401 response
- Looping through and combining calls to Woocommerce REST API
- get_filtered_term_product_counts – Get product terms if any products
- How to add custom attribute to all outofstock and all instock products automatically?
- Site infected by link
- Woocommerce – if selected attribute term equals
- split 1 cart item into instock and back ordered
- Need to forward Data from WooCommerce Webhook sent to same site WordPress REST API custom endpoint
- Add Product Permalink in woocommerce admin order page
- sessionStorage saves input value in browser but it is not loaded in the form field
- Adding a widget under an ‘Add to Cart’ button through a PHP snippet
- Woocommerce Related Product by 2 taxonomy
- WooCommerce – Add Shipping class below each product in Shopping Cart page
- WooCommerce Custom Tab with ACF Repeater Field
- Woocommerce variable products are being added to the card on the homepage (ajax)
- Woocommerce variation with radio button + price
- Display text of price (minus 20%) on every product page in a sentence.
- Display product attributes for current product
- Getting the date_diff function return the difference in days
- How to remove image on single product and get product to span page?
- Need some help with tweaking a code for woocommerce [closed]
- Adding placeholder text field to woocommerce checkout [closed]
- Getting custom field data from cart page to checkout page in woocomerce [closed]
- Send a custom notification to customer on WooCommerce cancelled order status
- How to code bulk order form in wordpress
- FATAL ERROR , Sommerce Theme [closed]
- Woocommerce linking variations
- WCFM Custom form
- Hide child of parent categories already hidden with “get_terms_args” – Woocommerce
- Find owner of coupon
- Removing the add to cart button from specific product pages
- PayPal button not showing and cannot retrieve order error in PayPal
- Add text below WooCommerce short description if metabox value is true