RnB — Plugin de réservation et location WooCommerce par redqteam
Pour les développeurs : contactez-nous en cas de blocage lors des implémentations
- dans le fichier wp-content\plugins\woocommerce-rental-and-booking\includes\rnb-global-functions.php ajoutez le code suivant :
if (class_exists('WOOCS') AND $daily_pricing > 0) { global $WOOCS; $daily_pricing = $WOOCS->woocs_exchange_value($daily_pricing); }
- Également dans le même fichier :
if (class_exists('WOOCS') AND $monthly_pricing > 0) { global $WOOCS; $monthly_pricing = $WOOCS->woocs_exchange_value($monthly_pricing); }
- Également dans le même fichier, ajoutez le code suivant :
if (class_exists('WOOCS') AND $general_price > 0) { global $WOOCS; $general_price = $WOOCS->woocs_exchange_value($general_price); }
- Également dans le même fichier, ajoutez le code suivant :
if (class_exists('WOOCS') AND $hourly_price > 0) { global $WOOCS; $hourly_price = $WOOCS->woocs_exchange_value($hourly_price); }
- Également dans le même fichier, ajoutez le code suivant :
if (class_exists('WOOCS') AND $hourly_price > 0) { global $WOOCS; $price_discount = $WOOCS->woocs_exchange_value($price_discount); }
- Dans le fichier wp-content\plugins\woocommerce-rental-and-booking\includes\class-rnb-product-cart.php ajoutez le code suivant :
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; } } } }
- dans le même fichier, ajoutez le code suivant :
if (class_exists('WOOCS') AND $duration_total > 0) { global $WOOCS; $duration_total = $WOOCS->woocs_exchange_value($duration_total); }
- dans le même fichier, ajoutez le code suivant :
if (class_exists('WOOCS') AND $cost > 0) { global $WOOCS; $cost = $WOOCS->woocs_exchange_value($cost); }
- dans le même fichier, ajoutez le code suivant :
if (class_exists('WOOCS') AND $cost > 0) { global $WOOCS; $cost = $WOOCS->woocs_exchange_value($cost); }
- dans le même fichier, ajoutez le code suivant :
if (class_exists('WOOCS') AND $rental_data['location_cost'] > 0) { global $WOOCS; $rental_data['location_cost'] = $WOOCS->woocs_exchange_value($rental_data['location_cost']); }
- dans le même fichier, ajoutez le code suivant :
if (class_exists('WOOCS') AND $category['cost'] > 0) { global $WOOCS; $category['cost'] = $WOOCS->woocs_exchange_value($category['cost']); }
- dans le même fichier, ajoutez le code suivant :
if (class_exists('WOOCS') AND $resource['cost'] > 0) { global $WOOCS; $resource['cost'] = $WOOCS->woocs_exchange_value($resource['cost']); }
- dans le même fichier, ajoutez le code suivant :
if (class_exists('WOOCS') AND $deposit['cost'] > 0) { global $WOOCS; $deposit['cost'] = $WOOCS->woocs_exchange_value($deposit['cost']); }
- dans le même fichier, ajoutez le code suivant :
if (class_exists('WOOCS') AND $adult['cost'] > 0) { global $WOOCS; $adult['cost'] = $WOOCS->woocs_exchange_value($adult['cost']); }
- dans le même fichier, ajoutez le code suivant :
if (class_exists('WOOCS') AND $child['cost'] > 0) { global $WOOCS; $child['cost'] = $WOOCS->woocs_exchange_value($child['cost']); }
- dans le même fichier, ajoutez le code suivant :
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']); }
- dans le fichier wp-content\plugins\woocommerce-rental-and-booking\includes\rnb-global-functions.php ajoutez le code suivant :
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']); } }
Cette modification se trouve dans le fichier d'un autre plugin, donc une mise à jour du plugin l'annulera. Notez le changement et réappliquez-le après chaque mise à jour de ce plugin — ou demandez à ses auteurs d'inclure le correctif de leur côté, ce qui est la seule version qui perdure. Si la modification concerne FOX lui-même, dites-le nous : un correctif qui doit être réappliqué manuellement est un bug de notre côté, pas une solution.