Search Documentation

WP Travel Developer Documentation

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

Filter :wp_travel_enable_sale

Is sale enabled or not filter.

Active Since v2.0.5

Source

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

Parameters
$enable_sale, $post_id, $pricing_options, $price_key

Example:

function prefix_wp_travel_enable_sale( $enable_sale, $post_id, $pricing_options, $price_key ) {
    if ( ‘100’ === $post_id ) {
    $enable_sale = false;
    } else {
    $enable_sale = true;
    }
    return $enable_sale;
}
add_filter( 'wp_travel_enable_sale', 'prefix_wp_travel_enable_sale', 12, 4 );
Was this article helpful to you? Yes No

How can we help?