jQuery(document).ready(function($) { // Function to toggle the pickup date based on the selected shipping method function togglePickupDate() { // Get the selected shipping method var selectedShippingMethod = $('input[name="shipping_method\\[0\\]"]:checked').val(); // Log the selected shipping method for debugging console.log('Selected Shipping Method: ', selectedShippingMethod); // Define the local pickup methods var localPickupMethods = ['local_pickup4', 'local_pickup5']; // Check if the selected method is one of the local pickup methods if (localPickupMethods.includes(selectedShippingMethod)) { // Show the pickup date field and log action $('#coderockz_woo_delivery_setting_wrapper').show(); $('#coderockz_woo_delivery_setting_wrapper input').prop('required', true); console.log('Pickup date field is shown'); } else { // Hide the pickup date field and log action $('#coderockz_woo_delivery_setting_wrapper').hide(); $('#coderockz_woo_delivery_setting_wrapper input').prop('required', false); console.log('Pickup date field is hidden'); } } // Initial check when the page loads togglePickupDate(); // Listen for shipping method changes $(document).on('change', 'input[name^="shipping_method"]', function() { console.log('Shipping method changed'); togglePickupDate(); }); // Listen for checkout updates from WooCommerce $(document).on('updated_checkout', function() { console.log('Checkout updated'); togglePickupDate(); }); // Listen for Elementor frontend reload events $(document).on('elementor/frontend/init', function() { console.log('Elementor frontend initialized'); togglePickupDate(); }); });

Easter Card-Happy Easter Bouquet of Tulips

May your Easter be as special and as beautiful as you are!

Make sure you put your message in the note field when you check out.

$3.79