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) Code display all rental type
  • 2) If you want to remove taxi, hotel, you can use bellow code
  1. FAQs

Hide other Rental Type when create a product

PreviousThe Calendar doesn't update color for bookingNextList hook for template

Last updated 5 months ago

You can add bellow code to functions.php file in child theme

1) Code display all rental type

add_filter( 'ovabrw_get_rental_type_name', function() {
	return [
		'day'				=> esc_html__( '1: Day', 'ova-brw' ),
		'hour'				=> esc_html__( '2: Hour', 'ova-brw' ),
		'mixed'				=> esc_html__( '3: Mixed (Day and Hour)', 'ova-brw' ),
		'period_time' 		=> esc_html__( '4: Period of Time ( 05:00 am - 10:00 am, 1 day, 2 days, 1 month, 6 months, 1 year... )', 'ova-brw' ),
		'transportation' 	=> esc_html__( '5: Transportation', 'ova-brw' ),
		'taxi' 				=> esc_html__( '6: Taxi', 'ova-brw' ),
		'hotel' 			=> esc_html__( '7: Hotel', 'ova-brw' ),
		'appointment' 		=> esc_html__( '8: Appointment', 'ova-brw' )
	];
});

2) If you want to remove taxi, hotel, you can use bellow code

add_filter( 'ovabrw_get_rental_type_name', function() {
	return [
		'day'				=> esc_html__( '1: Day', 'ova-brw' ),
		'hour'				=> esc_html__( '2: Hour', 'ova-brw' ),
		'mixed'				=> esc_html__( '3: Mixed (Day and Hour)', 'ova-brw' ),
		'period_time' 		=> esc_html__( '4: Period of Time ( 05:00 am - 10:00 am, 1 day, 2 days, 1 month, 6 months, 1 year... )', 'ova-brw' ),
		'transportation' 	=> esc_html__( '5: Transportation', 'ova-brw' ),
		'appointment' 		=> esc_html__( '8: Appointment', 'ova-brw' )
	];
});