Changeset 3154154
- Timestamp:
- 09/18/2024 08:32:41 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
checkoutchamp/trunk/includes/functions/Functions_Loader.php
r3147568 r3154154 48 48 let fourth_button = false; // Variable pour suivre l'état de la requête 49 49 let fifith_button = false; // Variable pour suivre l'état de la requête 50 let sixth_button = false; // Variable pour suivre l'état de la requête 50 51 51 52 if (jQuery('.checkout-button').length) { … … 64 65 jQuery('.button.checkout.wc-forward').css('visibility', 'hidden'); 65 66 } 66 67 67 if (jQuery('.wc-block-components-button.wp-element-button.wc-block-cart__submit-button').length) { 68 jQuery('.wc-block-components-button.wp-element-button.wc-block-cart__submit-button').css('visibility', 'hidden'); 69 } 68 70 69 71 setButtons() … … 180 182 } 181 183 184 185 if (jQuery('.wc-block-components-button.wp-element-button.wc-block-cart__submit-button').length && !sixth_button) { 186 sixth_button = true; 187 188 jQuery.ajax({ 189 url: checkoutchamp_fonctions.ajax_url, 190 type: 'POST', 191 data: { 192 action: 'checkoutchamp_get_checkout_button', 193 nonce: checkoutchamp_fonctions.checkoutchamp_get_checkout_button_nonce 194 }, 195 success: async function(response) { 196 if (response !== jQuery('.wc-block-components-button.wp-element-button.wc-block-cart__submit-button').attr('href')) 197 jQuery('.wc-block-components-button.wp-element-button.wc-block-cart__submit-button').attr('href', response.data.href); 198 }, 199 complete: function() { 200 jQuery('.wc-block-components-button.wp-element-button.wc-block-cart__submit-button').css('visibility', 'visible'); 201 sixth_button = false; 202 } 203 }); 204 } 182 205 183 206
Note: See TracChangeset
for help on using the changeset viewer.