Are you looking to customize the functionality of the Rental Products for WooCommerce extension? Below you will find a list of some of the available hooks, functions, and JavaScript events that can help you to get started.
Note: As per the WooCommerce support policy, we cannot help with the development of custom features and functionality. However, if you have any questions about the resources of this article, don’t hesitate to contact us.
Filter hooks in Rental Products
| Filter hook | Description |
wcrp_rental_products_advanced_pricing | Allows advanced pricing calculations to be used, see information under the advanced pricing product option |
wcrp_rental_products_cart_fees_disable_security_deposits | Rental cart fee disable security deposit programmatically e.g. for specific customers, cart contents, etc |
wcrp_rental_products_cart_item_price | Rental cart item price |
wcrp_rental_products_default_rental_options | Default rental options |
wcrp_rental_products_litepicker_language | ISO language string, default return is the WordPress language setting, used to set the language of the Litepicker calendar library used on rental form and availability checker, excludes translation of day/days strings, which are separate translation ready strings |
wcrp_rental_products_multiply_addons_total_by_number_of_days_selected_flat_fees | Include or exclude add-ons with flat fees from multiply add-ons total by number of days selected calculation |
wcrp_rental_products_order_add_rental_products_url | URL to access upon clicking the add rental product(s) button when adding/editing an order. |
wcrp_rental_products_rental_form_total_prefix | Prefix used before the rental total in the rental form totals. |
wcrp_rental_products_rental_form_total_days_parenthesis | Adds parenthesis around the total days shown in the rental form totals. |
wcrp_rental_products_rental_information_title | String from settings |
wcrp_rental_products_rental_price_display_prefix | String from settings |
wcrp_rental_products_rental_price_display_suffix | String from settings |
wcrp_rental_products_rental_price_html | Rental price HTML markup |
wcrp_rental_products_rentals_dashboard_calendar_event_name | Allows the event name used in the rows within the rental dashboard calendar to be manipulated, this event name is also used for the calendar feed. Event name, event data, public, and calendar mode is passed. Note that it is recommended that identifiable information is not included in the event name if the public variable is true. |
wcrp_rental_products_select_dates_button_html | Select dates button HTML |
wcrp_rental_products_text_availability_checker_applied | String from settings |
wcrp_rental_products_text_available_rental_stock_totals | String from settings |
wcrp_rental_products_text_check_availability | String from settings |
wcrp_rental_products_text_disable_rental_end_notice | String from settings |
wcrp_rental_products_text_disable_rental_start_notice | String from settings |
wcrp_rental_products_text_disable_rental_start_end_notice | String from settings |
wcrp_rental_products_text_in_person_pick_up_return | String from settings |
wcrp_rental_products_text_non_refundable | String from settings |
wcrp_rental_products_text_pick_up_time | String from settings |
wcrp_rental_products_text_refundable | String from settings |
wcrp_rental_products_text_rent_for | String from settings |
wcrp_rental_products_text_rent_from | String from settings |
wcrp_rental_products_text_rent_to | String from settings |
wcrp_rental_products_text_rental_available | String from settings |
wcrp_rental_products_text_rental_cancelled | String from settings |
wcrp_rental_products_text_rental_dates | String from settings |
wcrp_rental_products_text_rental_period | String from settings |
wcrp_rental_products_text_rental_returned | String from settings |
wcrp_rental_products_text_rental_return_within | String from settings |
wcrp_rental_products_text_rental_unavailable | String from settings |
wcrp_rental_products_text_reset_dates | String from settings |
wcrp_rental_products_text_return_date | String from settings |
wcrp_rental_products_text_return_time | String from settings |
wcrp_rental_products_text_security_deposit | String from settings |
wcrp_rental_products_text_select_dates | String from settings |
wcrp_rental_products_text_view_purchase_options | String from settings |
wcrp_rental_products_text_view_rental_options | String from settings |
wcrp_rental_products_text_view_rental_options | Allows a custom week start day to be set for the rentals dashboard calendar, instead of using the WordPress week starts on setting |
wcrp_rental_products_rental_date_format | Allows a custom date format to be set for rentals, instead of using the WordPress date format setting |
wcrp_rental_products_rental_form_after_quantity_disabled_hook_priority | Allows adjustment of the hook priority for the rental form when hooked via woocommerce_before_add_to_cart_button |
wcrp_rental_products_rental_form_after_quantity_enabled_hook_priority | Allows adjustment of the hook priority for the rental form when hooked via woocommerce_after_add_to_cart_quantity |
wcrp_rental_products_rental_form_first_day | Allows a custom week start day to be set for the rental form calendar, instead of using the WordPress week starts on setting |
wcrp_rental_products_rental_time_format | Allows a custom time format to be set for rentals, instead of using the WordPress time format setting |
Functions
| Function | Return |
wcrp_rental_products_advanced_configuration | Array of any advanced configuration options set |
wcrp_rental_products_availability_checker_data | Array of availability checker data the user has selected in the availability checker |
wcrp_rental_products_check_availability | Availability status string |
wcrp_rental_products_default_rental_options | Array of the default rental options |
wcrp_rental_products_is_rental_only | True/false |
wcrp_rental_products_is_rental_purchase | True/false |
wcrp_rental_products_order_has_rentals | True/false |
wcrp_rental_products_rental_date_format | Rental date formatted string |
wcrp_rental_products_rental_form_date_format | Rental form date formatted string |
wcrp_rental_products_rental_form_first_day | First day set on rental form string |
wcrp_rental_products_rental_form_maximum_date | The maximum date string or number of days until allowed for selection in the rental form |
wcrp_rental_products_rental_time_format | Rental time formatted string |
JavaScript Events
| Event | Description |
wcrp_rental_products_product_rental_form_update | Fires on rental form update on product page. |
More Information
Do you have more questions? You can click here to return to the Rental Products for WooCommerce’s Getting Started table of contents.
You didn’t find what you were looking for? We’d love to hear from you and help you with any questions you have.