BRW
  • Install and Update Plugin
  • Create Products
    • Rental Type
      • Rental Type: Day
      • Rental Type: Hour
      • Rental Type: Mixed ( Day and Hour)
      • Rental Type: Period of Time
      • Rental Type: Transportation
      • Rental Type: Taxi
      • Rental Type: Hotel
      • Rental Type: Appointment
    • Insurance
    • Deposit Payment
    • Inventory
    • Specifications
    • Features
    • Resources
    • Services
    • Unavailable Time
    • Advanced Options
    • Place
  • Global Settings
    • General
    • Product Archive
    • Product Details
    • Recaptcha
    • Deposit
    • Search
    • Cancellation Policy
    • Reminder
    • Order Settings
    • Typography & Color
  • Create Categories
  • Custom Checkout Fields
  • Custom Taxonomy
  • Manage Orders
  • Booking Calendar
  • Create Orders in Back-end
  • Shortcodes
    • Search Form
    • Search Ajax
    • Search Hotel Form
    • Search Hotel Ajax
    • Search Taxi Form
    • Search Taxi Ajax
    • Products
    • Product - Booking Form
    • Product - Request Booking Form
    • Product - Calendar
    • Product - Table Price
    • Product - Features
    • Product - Image
    • Product - Unavailable Time
    • Product - Title
    • Product - Price
    • Product - Review
    • Product - Taxonomy
    • Product - Meta
    • Product - Specifications
    • Product - Short Description
    • Product - Tabs
    • Product - Related
  • Elements in Elementor
    • Category Filter
    • Category Thumbnail
    • Product Slider
    • Ajax Search Hotel
    • Search Hotel
    • Ajax Search Map
    • Search Taxi
    • Search Taxi Ajax
    • Custom Taxonomy
    • Product Booking Form
    • Product Calendar
    • Product Features
    • Product Images
    • Product images 2
    • Product Map
    • Product Meta
    • Product Price
    • Product Rating
    • Product Related
    • Product Short Description
    • Product Specifications
    • Product Price Table
    • Product Tabs
    • Product Title
    • Product Unavailable Time
  • Make Product Template in Elementor
  • Translation
  • Customize Template in Theme or Child Theme
  • Icons
  • FAQs
    • Customer Cancel Orders
    • Admin refund an Order
    • Delete Fields in Checkout Page
    • Access to checkout page when click Booking button
    • How to create Multiple Currency
    • How to create Multiple Language
    • Change 'location', 'vehicle' in URL
    • Change 'product' in url
    • How to setup Tax in product
    • The Calendar doesn't update color for booking
    • Hide other Rental Type when create a product
  • List hook for template
    • Loop
    • Single
    • Other
Powered by GitBook
On this page
  1. FAQs

Delete Fields in Checkout Page

Using a code snippet to remove checkout fields

You can add the below code snippet to the Functions.php file of your theme. This will remove all the possible fields from your checkout page. You will have to make changes to the snippet according to your specific need.

add_filter( 'woocommerce_checkout_fields', 'wc_remove_checkout_fields' );


function wc_remove_checkout_fields( $fields ) {

// Billing fields
unset( $fields['billing']['billing_company'] );
unset( $fields['billing']['billing_email'] );
unset( $fields['billing']['billing_phone'] );
unset( $fields['billing']['billing_state'] );
unset( $fields['billing']['billing_first_name'] );
unset( $fields['billing']['billing_last_name'] );
unset( $fields['billing']['billing_address_1'] );
unset( $fields['billing']['billing_address_2'] );
unset( $fields['billing']['billing_city'] );
unset( $fields['billing']['billing_postcode'] );

// Shipping fields
unset( $fields['shipping']['shipping_company'] );
unset( $fields['shipping']['shipping_phone'] );
unset( $fields['shipping']['shipping_state'] );
unset( $fields['shipping']['shipping_first_name'] );
unset( $fields['shipping']['shipping_last_name'] );
unset( $fields['shipping']['shipping_address_1'] );
unset( $fields['shipping']['shipping_address_2'] );
unset( $fields['shipping']['shipping_city'] );
unset( $fields['shipping']['shipping_postcode'] );

// Order fields
unset( $fields['order']['order_comments'] );

return $fields;

}
PreviousAdmin refund an OrderNextAccess to checkout page when click Booking button

Last updated 10 months ago