Skip to content

Instantly share code, notes, and snippets.

@fridaynext
Created December 6, 2016 17:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fridaynext/380798e9379b8a857d4eabb93d0ca410 to your computer and use it in GitHub Desktop.
Save fridaynext/380798e9379b8a857d4eabb93d0ca410 to your computer and use it in GitHub Desktop.
<?php
// Change position of delivery/order time selction
add_filter('openinghours_chooser_position','change_position');
function change_position( $m ) {
return 'woocommerce_before_order_notes';
}
// Filter for message above time picker
add_filter('openinghours_frontendtext_choicelabel','change_closed_text');
function change_closed_text() {
return "Select your date/time for pickup/delivery";
}
add_filter('openinghours_frontendtext_notcurrentlyopeninfo','change_another_text');
function change_another_text() {
return '<span class="checkout">You will select your date/time of pickup/delivery on the final checkout page.<br /></span>Next available time:';
}
add_filter('openinghours_shopsubjectnoun','change_shop_noun');
function change_shop_noun() {
return "restaurant";
}
?>
@AubinCoste
Copy link

Hi, is it possible de remove totally the datepicker from the checkout fields ?
I've created my own select field to select a delivery time and now i want to remove the opening hours one, is it possible with a hook ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment