FOX - WooCommerce Currency Switcher Professional

RnB – WooCommerce Booking & Rental Plugin By redqteam

Plugin link: https://codecanyon.pluginus.net/item/rnb-woocommerce-rental-booking-system/14835145

Signal is sent: https://codecanyon.net/comments/29910477

NOTE: From v15.0.1 – 16 Oct 2023 this plugin is compatible with FOX plugin without any further modifications according information from “RnB – WooCommerce Booking & Rental Plugin” dev team


For developers: contact us if any stuck with implementations

  • into file wp-content\plugins\woocommerce-rental-and-booking\includes\rnb-global-functions.php add next code:
    if (class_exists('WOOCS') AND $daily_pricing > 0) {
        global $WOOCS;
        $daily_pricing = $WOOCS->woocs_exchange_value($daily_pricing);
    }
    

  • Also in the same file:
    if (class_exists('WOOCS') AND $monthly_pricing > 0) {
        global $WOOCS;
        $monthly_pricing = $WOOCS->woocs_exchange_value($monthly_pricing);
    }
    

  • Also into the same file add next code:
    if (class_exists('WOOCS') AND $general_price > 0) {
        global $WOOCS;
        $general_price = $WOOCS->woocs_exchange_value($general_price);
    }
    

  • Also into the same file add next code:
    if (class_exists('WOOCS') AND $hourly_price > 0) {
        global $WOOCS;
        $hourly_price = $WOOCS->woocs_exchange_value($hourly_price);
    }
    

  • Also into the same file add next code:
    if (class_exists('WOOCS') AND $hourly_price > 0) {
        global $WOOCS;
        $price_discount = $WOOCS->woocs_exchange_value($price_discount);
    }
    

  • Into file wp-content\plugins\woocommerce-rental-and-booking\includes\class-rnb-product-cart.php add next code:
    if (isset($cart_item_meta['rental_data']['rental_days_and_costs']['cost'])) {
        if (class_exists('WOOCS') AND $cart_item_meta['rental_data']['rental_days_and_costs']['cost']) {
            global $WOOCS;
            if ($WOOCS->is_multiple_allowed) {
                $currrent = $WOOCS->current_currency;
                if ($currrent != $WOOCS->default_currency) {
                    $currencies = $WOOCS->get_currencies();
                    $rate = $currencies[$currrent]['rate'];
                    $cart_item_meta['rental_data']['rental_days_and_costs']['cost'] = $cart_item_meta['rental_data']['rental_days_and_costs']['cost'] / $rate;
                    $cart_item_meta['rental_data']['rental_days_and_costs']['line_total'] = $cart_item_meta['rental_data']['rental_days_and_costs']['line_total'] / $rate;
                    $cart_item_meta['rental_data']['rental_days_and_costs']['price_breakdown']['duration_total'] = $cart_item_meta['rental_data']['rental_days_and_costs']['price_breakdown']['duration_total'] / $rate;
                    $cart_item_meta['rental_data']['rental_days_and_costs']['price_breakdown']['total'] = $cart_item_meta['rental_data']['rental_days_and_costs']['price_breakdown']['total'] / $rate;
                    $cart_item_meta['rental_data']['rental_days_and_costs']['price_breakdown']['deposit_free_total'] = $cart_item_meta['rental_data']['rental_days_and_costs']['price_breakdown']['deposit_free_total'] / $rate;
                    $cart_item_meta['rental_data']['rental_days_and_costs']['price_breakdown']['duration_breakdown']['daily'] = $cart_item_meta['rental_data']['rental_days_and_costs']['price_breakdown']['duration_breakdown']['daily'] / $rate;
                }
            }
        }
    }

  • into the same file add next code:
    if (class_exists('WOOCS') AND $duration_total > 0) {
        global $WOOCS;
        $duration_total = $WOOCS->woocs_exchange_value($duration_total);
    }

  • into the same file add next code:
    if (class_exists('WOOCS') AND $cost > 0) {
        global $WOOCS;
        $cost = $WOOCS->woocs_exchange_value($cost);
    }
    

  • into the same file add next code:
    if (class_exists('WOOCS') AND $cost > 0) {
        global $WOOCS;
        $cost = $WOOCS->woocs_exchange_value($cost);
    }
    

  • into the same file add next code:
    if (class_exists('WOOCS') AND $rental_data['location_cost'] > 0) {
        global $WOOCS;
        $rental_data['location_cost'] = $WOOCS->woocs_exchange_value($rental_data['location_cost']);
    }
    

  • into the same file add next code:
    if (class_exists('WOOCS') AND $category['cost'] > 0) {
        global $WOOCS;
        $category['cost'] = $WOOCS->woocs_exchange_value($category['cost']);
    }
    

  • into the same file add next code:
    if (class_exists('WOOCS') AND $resource['cost'] > 0) {
        global $WOOCS;
        $resource['cost'] = $WOOCS->woocs_exchange_value($resource['cost']);
    }
    

  • into the same file add next code:
    if (class_exists('WOOCS') AND $deposit['cost'] > 0) {
        global $WOOCS;
        $deposit['cost'] = $WOOCS->woocs_exchange_value($deposit['cost']);
    }
    

  • into the same file add next code:
    if (class_exists('WOOCS') AND $adult['cost'] > 0) {
        global $WOOCS;
        $adult['cost'] = $WOOCS->woocs_exchange_value($adult['cost']);
    }
    

  • into the same file add next code:
    if (class_exists('WOOCS') AND $child['cost'] > 0) {
        global $WOOCS;
        $child['cost'] = $WOOCS->woocs_exchange_value($child['cost']);
    }
    

  • into the same file add next code:
    if (class_exists('WOOCS') AND $rental_data['rental_days_and_costs']['due_payment'] > 0) {
        global $WOOCS;
        $rental_data['rental_days_and_costs']['due_payment'] = $WOOCS->woocs_exchange_value($rental_data['rental_days_and_costs']['due_payment']);
    }
    

  • into file wp-content\plugins\woocommerce-rental-and-booking\includes\rnb-global-functions.php add next code:
    foreach ($days_range as $key => $range) {
        if (class_exists('WOOCS') AND isset($days_range[$key]['range_cost']) AND $days_range[$key]['range_cost'] > 0) {
            global $WOOCS;
            $days_range[$key]['range_cost'] = $WOOCS->woocs_exchange_value($days_range[$key]['range_cost']);
        }
    }