Search Documentation

WP Travel Developer Documentation

  1. Home
  2. Docs
  3. WP Travel Developer Documentation
  4. Filters Associated With Pricing
  5. Filter: wptravel_get_price

Filter: wptravel_get_price

Hook to Modify the existing price. You can use this filter to modify your price.

Active Since v4.6.4

Source
File: core/helpers/pricings.php
Method/Function: get_price

Parameters
$price (Price of the trips)
$args (Array of data which consists of values (trip_id (required), is_regular_price, pricing_id, category_id, price_key ))

Example:

function wptravel_customized_price( $price, $args ) {
   // Your price alter code here.
   return $price; // This return value is modified price.
}
add_filter( 'wptravel_get_price', 'wptravel_customized_price' );
Was this article helpful to you? Yes No

How can we help?