Search Documentation

WP Travel Developer Documentation

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

Filter :wp_travel_price

WP Travel price filter.

Source

File: /inc/helpers/trips.php
Used by: /inc/helpers/trips.php

Parameters
$sale_price

Example:

function prefix_wp_travel_price( $sale_price ) {
    if ( $sale_price > 100 ) {
    $sale_price = $sale_price - (0.1 * $sale_price);
    }
    return $sale_price;
}
add_filter( 'wp_travel_price', 'prefix_wp_travel_price' );
Was this article helpful to you? Yes No

How can we help?