This file contains 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
// Place this code in your theme's functions.php file | |
// Hook in | |
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' ); | |
// Our hooked in function - $fields is passed via the filter! | |
function custom_override_checkout_fields( $fields ) { | |
$fields['order']['order_comments']['required'] = true; | |
return $fields; | |
} |
This file contains 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
<?php | |
function bkap_show_hide_persons_based_on_date( $data ) { | |
$persons_to_hide = array( | |
'84217' => array( // 84217 is product id | |
array( | |
'dates' => '2023-06-25,2023-06-22', // in Y-m-d format. | |
'person_ids' => array( 84226, 84227 ), // 84226, 84227 are persons ids to hide | |
), | |
array( |