murilocarvalho
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] unset Address 2 Field Return Undefined in Cart Page@ilovebarushka When you return to version 7.4.1, try to enable Address 2 again and go to the checkout page, you will see that “undefined” will be written in the field… Delete it, go back to the cart, simulate shipping to the address back to normal and then disable Address 2 again.
For those who want to use the latest version of WooCommerce, you need to leave Address 2 enabled and hide it with CSS using display:none; !important (needs !important, because for some reason, when we use display:none on the Address 2 field, the field gets an inline-style display: block)
Forum: Plugins
In reply to: [WooCommerce] unset Address 2 Field Return Undefined in Cart PageI just verified that the problem started from version 7.5.0. I tested it on 7.4.1 and it’s normal.
Forum: Plugins
In reply to: [WooCommerce] unset Address 2 Field Return Undefined in Cart PageI also just tried to hide it through the Appearance > WooCommerce > Checkout menu, and it’s causing the same problem.
Forum: Plugins
In reply to: [LiteSpeed Cache] Cache issue with wc-bookings datepickerHello qtwrk! I waited 2 days, and for now it seems that the problem has been solved! Still, in case the problem returns for some reason, is there an email I can contact you directly or would I need to open a new thread?
I thank you immensely in advance, I would never have solved or imagined this solution.
You saved me and saved my client!
Forum: Plugins
In reply to: [LiteSpeed Cache] Cache issue with wc-bookings datepickerOk, I’ll try the above solution and get back to you soon! Thank you for your attention, I hope this resolves! Please do not close the topic…
Forum: Plugins
In reply to: [LiteSpeed Cache] Cache issue with wc-bookings datepickerJust to let you know. It looks like the Scheduled Purge URLs don’t work for the problem… I put /reservas/fixi-restaurante (product page) in the list to purge at 04:00. I just checked (today) and the calendar was looping and with the error in the console, and yesterday I had cleared the cache and the calendar had normalized. I just cleared the cache and it got back to normal, but I’m having to do this every day.
GET https://fixirestaurante.com.br/?wc-ajax=wc_bookings_find_booked_day_blocks&elementor_page_id=396&product_id=396&wc-ajax=wc_bookings_find_booked_day_blocks&security=3788073548&resource_id=0&min_date=2023-03-13&max_date=2023-04-20 403 send @ jquery.min.js?ver=3.6.1:2 ajax @ jquery.min.js?ver=3.6.1:2 s.ajax.s.ajax @ 95bc3fc3d4e5370caa9c0804979b70ce.js?ver=97174:12 i.get_data @ date-picker.js:829 i.create @ date-picker.js:688 date_picker_init @ date-picker.js:257 (anonymous) @ date-picker.js:30 each @ jquery.min.js?ver=3.6.1:2 each @ jquery.min.js?ver=3.6.1:2 init @ date-picker.js:25 (anonymous) @ date-picker.js:1156 e @ jquery.min.js?ver=3.6.1:2 t @ jquery.min.js?ver=3.6.1:2 setTimeout (async) (anonymous) @ jquery.min.js?ver=3.6.1:2 c @ jquery.min.js?ver=3.6.1:2 fireWith @ jquery.min.js?ver=3.6.1:2 fire @ jquery.min.js?ver=3.6.1:2 c @ jquery.min.js?ver=3.6.1:2 fireWith @ jquery.min.js?ver=3.6.1:2 ready @ jquery.min.js?ver=3.6.1:2 $ @ jquery.min.js?ver=3.6.1:2
the s.ajax.s.ajax @ 95bc3fc3d4e5370caa9c0804979b70ce.js?ver=97174:12 came from wp-content/litespeed/js/95bc3fc3d4e5370caa9c0804979b70ce.js?ver=97174
Forum: Plugins
In reply to: [LiteSpeed Cache] Cache issue with wc-bookings datepickerNo, it’s WooCommerce Bookings from WooCommerce itself…
I found this in the file wp-content\plugins\woocommerce-bookings\includes\admin\views\html-create-booking-page-2.php
<div class="wrap woocommerce"> <h2><?php esc_html_e( 'Add Booking', 'woocommerce-bookings' ); ?></h2> <?php $this->show_errors(); ?> <form method="POST" data-nonce="<?php echo esc_attr( wp_create_nonce( 'find-booked-day-blocks' ) ); ?>" id="wc-bookings-booking-form"> <table class="form-table"> <tbody> <tr> <th scope="row"> <label><?php esc_html_e( 'Booking Data', 'woocommerce-bookings' ); ?></label> </th> <td> <div class="wc-bookings-booking-form"> <?php $booking_form->output(); ?> <div class="wc-bookings-booking-cost" style="display:none"></div> </div> </td> </tr> <tr valign="top"> <th scope="row"> </th> <td> <input type="submit" name="create_booking_2" class="button-primary add_custom_booking" value="<?php esc_attr_e( 'Add Booking', 'woocommerce-bookings' ); ?>" /> <input type="hidden" name="customer_id" value="<?php echo esc_attr( $customer_id ); ?>" /> <input type="hidden" name="bookable_product_id" value="<?php echo esc_attr( $bookable_product_id ); ?>" /> <input type="hidden" name="add-to-cart" value="<?php echo esc_attr( $bookable_product_id ); ?>" /> <input type="hidden" name="booking_order" value="<?php echo esc_attr( $booking_order ); ?>" /> <?php wp_nonce_field( 'create_booking_notification' ); ?> </td> </tr> </tbody> </table> </form> </div>
this in the file wp-content\plugins\woocommerce-bookings\includes\booking-form\class-wc-booking-form.php
wp_enqueue_script( 'wc-bookings-booking-form', WC_BOOKINGS_PLUGIN_URL . '/dist/frontend.js', array( 'jquery', 'jquery-blockui', 'jquery-ui-datepicker', 'underscore' ), WC_BOOKINGS_VERSION, true ); wp_localize_script( 'wc-bookings-booking-form', 'wc_bookings_booking_form', $wc_bookings_booking_form_args ); wp_localize_script( 'wc-bookings-booking-form', 'wc_bookings_date_picker_args', $wc_bookings_date_picker_args ); wp_enqueue_script( 'wc-bookings-date' ); // Variables for JS scripts $booking_form_params = array( 'cache_ajax_requests' => 'false', 'nonce' => array( 'get_end_time_html' => wp_create_nonce( 'get_end_time_html' ), 'show_available_month_blocks' => wp_create_nonce( 'show_available_month_blocks' ), ), 'ajax_url' => admin_url( 'admin-ajax.php' ), 'i18n_date_unavailable' => __( 'This date is unavailable', 'woocommerce-bookings' ), 'i18n_date_fully_booked' => __( 'This date is fully booked and unavailable', 'woocommerce-bookings' ), 'i18n_date_partially_booked' => __( 'This date is partially booked - but bookings still remain', 'woocommerce-bookings' ), 'i18n_date_available' => __( 'This date is available', 'woocommerce-bookings' ), 'i18n_start_date' => __( 'Choose a Start Date', 'woocommerce-bookings' ), 'i18n_end_date' => __( 'Choose an End Date', 'woocommerce-bookings' ), 'i18n_dates' => __( 'Dates', 'woocommerce-bookings' ), 'i18n_choose_options' => __( 'Please select the options for your booking and make sure duration rules apply.', 'woocommerce-bookings' ), 'i18n_clear_date_selection' => __( 'To clear selection, pick a new start date', 'woocommerce-bookings' ), 'i18n_request_failed' => __( 'We weren\'t able to get that information. Please contact the store owner for help.', 'woocommerce-bookings' ), 'pao_pre_30' => ( defined( 'WC_PRODUCT_ADDONS_VERSION' ) && version_compare( WC_PRODUCT_ADDONS_VERSION, '3.0', '<' ) ) ? 'true' : 'false', 'pao_active' => class_exists( 'WC_Product_Addons' ), 'timezone_conversion' => wc_should_convert_timezone(), 'client_firstday' => 'yes' === WC_Bookings_Timezone_Settings::get( 'use_client_firstday' ), 'server_timezone' => wc_booking_get_timezone_string(), 'server_time_format' => wc_bookings_convert_to_moment_format( wc_bookings_time_format() ), 'i18n_store_server_time' => esc_js( __( 'Store server time: ', 'woocommerce-bookings' ) ), ); wp_localize_script( 'wc-bookings-booking-form', 'booking_form_params', apply_filters( 'booking_form_params', $booking_form_params ) );
and this in the file wp-content\plugins\woocommerce-bookings\templates\single-product\add-to-cart\booking.php
if ( ! $product->is_purchasable() ) { return; } $nonce = wp_create_nonce( 'find-booked-day-blocks' ); do_action( 'woocommerce_before_add_to_cart_form' ); ?> <noscript><?php esc_html_e( 'Your browser must support JavaScript in order to make a booking.', 'woocommerce-bookings' ); ?></noscript> <form class="cart" method="post" enctype='multipart/form-data' data-nonce="<?php echo esc_attr( $nonce ); ?>"> <div id="wc-bookings-booking-form" class="wc-bookings-booking-form" style="display:none"> <?php do_action( 'woocommerce_before_booking_form' ); ?> <?php $booking_form->output(); ?> <div class="wc-bookings-booking-cost price" style="display:none" data-raw-price=""></div> </div> <?php do_action( 'woocommerce_before_add_to_cart_button' ); ?> <input type="hidden" name="add-to-cart" value="<?php echo esc_attr( is_callable( array( $product, 'get_id' ) ) ? $product->get_id() : $product->id ); ?>" class="wc-booking-product-id" /> <button type="submit" class="wc-bookings-booking-form-button single_add_to_cart_button button alt disabled" style="display:none"><?php echo esc_html( $product->single_add_to_cart_text() ); ?></button> <?php do_action( 'woocommerce_after_add_to_cart_button' ); ?> </form>
Forum: Plugins
In reply to: [LiteSpeed Cache] Cache issue with wc-bookings datepickerReport number:?QFLOPLIQ
There it is, but I don’t know if you ask for this number as a type of error log, because I needed to clear the plugin’s cache for the calendar to work again on the client’s site.