1. Home
  2. Knowledge Base
  3. Rental Products for WooCommerce
  4. Rental Products for WooCommerce Developer Resources

Rental Products for WooCommerce Developer Resources

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 hookDescription
wcrp_rental_products_advanced_pricingAllows advanced pricing calculations to be used, see information under the advanced pricing product option
wcrp_rental_products_cart_fees_disable_security_depositsRental cart fee disable security deposit programmatically e.g. for specific customers, cart contents, etc
wcrp_rental_products_cart_item_priceRental cart item price
wcrp_rental_products_default_rental_optionsDefault rental options
wcrp_rental_products_litepicker_languageISO 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_feesInclude 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_urlURL to access upon clicking the add rental product(s) button when adding/editing an order.
wcrp_rental_products_rental_form_total_prefixPrefix used before the rental total in the rental form totals.
wcrp_rental_products_rental_form_total_days_parenthesisAdds parenthesis around the total days shown in the rental form totals.
wcrp_rental_products_rental_information_titleString from settings
wcrp_rental_products_rental_price_display_prefixString from settings
wcrp_rental_products_rental_price_display_suffixString from settings
wcrp_rental_products_rental_price_htmlRental price HTML markup
wcrp_rental_products_rentals_dashboard_calendar_event_nameAllows 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_htmlSelect dates button HTML
wcrp_rental_products_text_availability_checker_appliedString from settings
wcrp_rental_products_text_available_rental_stock_totalsString from settings
wcrp_rental_products_text_check_availabilityString from settings
wcrp_rental_products_text_disable_rental_end_noticeString from settings
wcrp_rental_products_text_disable_rental_start_noticeString from settings
wcrp_rental_products_text_disable_rental_start_end_noticeString from settings
wcrp_rental_products_text_in_person_pick_up_returnString from settings
wcrp_rental_products_text_non_refundableString from settings
wcrp_rental_products_text_pick_up_timeString from settings
wcrp_rental_products_text_refundableString from settings
wcrp_rental_products_text_rent_forString from settings
wcrp_rental_products_text_rent_fromString from settings
wcrp_rental_products_text_rent_toString from settings
wcrp_rental_products_text_rental_availableString from settings
wcrp_rental_products_text_rental_cancelledString from settings
wcrp_rental_products_text_rental_datesString from settings
wcrp_rental_products_text_rental_periodString from settings
wcrp_rental_products_text_rental_returnedString from settings
wcrp_rental_products_text_rental_return_withinString from settings
wcrp_rental_products_text_rental_unavailableString from settings
wcrp_rental_products_text_reset_datesString from settings
wcrp_rental_products_text_return_dateString from settings
wcrp_rental_products_text_return_timeString from settings
wcrp_rental_products_text_security_depositString from settings
wcrp_rental_products_text_select_datesString from settings
wcrp_rental_products_text_view_purchase_optionsString from settings
wcrp_rental_products_text_view_rental_optionsString from settings
wcrp_rental_products_text_view_rental_optionsAllows 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_formatAllows 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_priorityAllows 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_priorityAllows adjustment of the hook priority for the rental form when hooked via woocommerce_after_add_to_cart_quantity
wcrp_rental_products_rental_form_first_dayAllows 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_formatAllows a custom time format to be set for rentals, instead of using the WordPress time format setting

Functions

FunctionReturn
wcrp_rental_products_advanced_configurationArray of any advanced configuration options set
wcrp_rental_products_availability_checker_dataArray of availability checker data the user has selected in the availability checker
wcrp_rental_products_check_availabilityAvailability status string
wcrp_rental_products_default_rental_optionsArray of the default rental options
wcrp_rental_products_is_rental_onlyTrue/false
wcrp_rental_products_is_rental_purchaseTrue/false
wcrp_rental_products_order_has_rentalsTrue/false
wcrp_rental_products_rental_date_formatRental date formatted string
wcrp_rental_products_rental_form_date_formatRental form date formatted string
wcrp_rental_products_rental_form_first_dayFirst day set on rental form string
wcrp_rental_products_rental_form_maximum_dateThe maximum date string or number of days until allowed for selection in the rental form
wcrp_rental_products_rental_time_formatRental time formatted string

JavaScript Events

EventDescription
wcrp_rental_products_product_rental_form_updateFires 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.

Was this article helpful?

Related Articles

Need Support?

Please reach out if you can't find the answer!
Contact us