Created
March 28, 2020 06:38
-
-
Save tasz/81e2da2109b048f58358fa9935715d55 to your computer and use it in GitHub Desktop.
Covid-19 woocommerce lockdown Shipping Delay message
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( 'woocommerce_checkout_after_terms_and_conditions', 'covid_19_checkout_code', 10 ); | |
function covid_19_checkout_code( ) { | |
echo '<div class="woocommerce-danger"><p class="form-row validate-required"> | |
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox checkbox"> | |
<input class="woocommerce-form__input woocommerce-form__input-checkbox input-checkbox" name="covid" id="covid" type="checkbox"> | |
Covid 19 lock down: I am aware that my order only can be dispatched after lock down is over. | |
</label> | |
</p></div> | |
<script> | |
jQuery( document ).ready(function() { | |
jQuery("#place_order").attr("disabled", true); | |
}); | |
jQuery("#covid").click(function() { | |
jQuery("#place_order").attr("disabled", !this.checked); | |
}); | |
</script> | |
'; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment