Last active
June 23, 2026 04:35
-
-
Save rajeshsingh520/f8e36dadd16f8773ead90163e470a024 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action( 'wp_footer', function() { | |
| if ( ! is_checkout() || is_order_received_page() ) { | |
| return; | |
| } | |
| ?> | |
| <script> | |
| jQuery(function($) { | |
| function toggleDeliveryDateBlock() { | |
| var giftValue = $('select[name="1728035537403_select_1728036013112"]').val(); | |
| if (giftValue && giftValue.toLowerCase() === 'igen') { | |
| $('#pi_checkout_field').attr('style', 'display: none !important; visibility: hidden !important;'); | |
| $('.pisol-date-time-approx-message').attr('style', 'display: none !important; visibility: hidden !important;'); | |
| } else { | |
| $('#pi_checkout_field').attr('style', 'display: block !important; visibility: visible !important;'); | |
| $('.pisol-date-time-approx-message').attr('style', 'display: block !important; visibility: visible !important;'); | |
| } | |
| } | |
| toggleDeliveryDateBlock(); | |
| var isPickup = $('input[name="pi_delivery_type"]').val().toLowerCase() === 'pickup'; | |
| if(isPickup){ | |
| $('select[name="1728035537403_select_1728036013112"]').prop('disabled',true); | |
| } | |
| $(document).on('change', 'select[name="1728035537403_select_1728036013112"]', function() { | |
| toggleDeliveryDateBlock(); | |
| }); | |
| }); | |
| </script> | |
| <?php | |
| }, 999 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment