Allows to change initial set up of booking calendar. Usage example:
window.JetPlugins.hooks.addFilter( "jet-booking.input.config", "jetBooking", ( config ) => {
const validateDay = config.beforeShowDay;| window.addEventListener( 'DOMContentLoaded', function() { | |
| // You can edit this variable. | |
| const buffer = 4; // Number of days to be disabled as buffer; | |
| // You can edit this variable. | |
| const isBufferDay = ( day ) => { | |
| if ( JetABAFData.booked_dates.includes( day.format( 'YYYY-MM-DD' ) ) ) { | |
| return false; | |
| } |
| <php add_action( 'wp_enqueue_scripts', function() { | |
| wp_enqueue_style( 'int-tel-input-style', 'https://cdn.jsdelivr.net/npm/[email protected]/build/css/intlTelInput.css' ); | |
| wp_enqueue_script( 'int-tel-input-script', 'https://cdn.jsdelivr.net/npm/[email protected]/build/js/intlTelInput.min.js', [], '20.3.0', true ); | |
| } ); |
| <?php | |
| add_action( 'jet-engine/register-macros', function() { | |
| /** | |
| * Return purchased products IDs. | |
| */ | |
| class Purchased_Products_Macro extends \Jet_Engine_Base_Macros { | |
| public function macros_tag() { |
| <?php | |
| // Exit if accessed directly | |
| defined( 'ABSPATH' ) || exit; | |
| // Postcodes4u Options | |
| global $pc4u_options; | |
| $heading = isset( $settings['checkout_shipping_form_title_text'] ) && ! empty($settings['checkout_shipping_form_title_text'] ) ? $settings['checkout_shipping_form_title_text'] : 'Ship to a different address?'; | |
| ?> |
| <?php | |
| /** | |
| * Use for Products List widget: | |
| * `jet-woo-builder/shortcodes/jet-woo-products-list/not-found-message` | |
| * | |
| * For Wishlist widget: | |
| * `jet-cw/wishlist/empty_text` | |
| * | |
| * For Compare Table widget: | |
| * `jet-cw/compare/empty_text` |
| <?php | |
| add_filter( 'jet-engine/listings/macros-list', '__your_theme_prefix_get_products_on_sale' ); | |
| // Add macros to list. | |
| function __your_theme_prefix_get_products_on_sale( $macros_list ) { | |
| $macros_list['on_sale_products_ids'] = [ | |
| 'label' => esc_html__( 'On Sale Products IDs', 'jet-engine' ), | |
| 'cb' => 'get_on_sale_products_ids', | |
| ]; |
| <?php | |
| add_filter( 'jet-woo-builder/shortcodes/jet-woo-products/not-found-message', '__your_theme_prefix_set_custom_not_found_message', 10, 2 ); | |
| function __your_theme_prefix_set_custom_not_found_message( $message, $object ) { | |
| $query = $object->query(); | |
| if ( $query->get( 'jet_smart_filters' ) === jet_smart_filters()->render->request_provider( 'raw' ) && ! $query->have_posts() ) { | |
| $message = 'Your filter settings do not return a match. Please choose other options'; // for smart filters | |
| } elseif ( ! $query->have_posts() ) { |
| <?php | |
| add_filter( 'jet-woo-builder/template-functions/product-price', 'get_needed_price' ); | |
| function get_needed_price( $html ) { | |
| global $product; | |
| if ( ! is_a( $product, 'WC_Product' ) ) { | |
| return null; | |
| } |
| <?php | |
| add_filter( 'jet-woo-builder/template-functions/product-price', 'get_wvs_pro_archive_variation_template', 999, 1 ); | |
| function get_wvs_pro_archive_variation_template( $html ) { | |
| $wvs_archive_variation_template = wvs_pro_archive_variation_template(); | |
| $html .= $wvs_archive_variation_template; | |
| return '<div class="price">' . $html . '</div>'; | |