This feature would be awesome for stores that have a special offer on set days of week.
Like JustEat have a Two for Tuesday promo, many stores may find this a handy Feature
Here is an example on how i envision it, Please enjoy the code.
// Add valid days checkboxes to the coupon admin page
add_action( ‘woocommerce_coupon_options’, ‘add_valid_days_field_to_coupon’ );
function add_valid_days_field_to_coupon() {
$days_of_week = [‘Monday’, ‘Tuesday’, ‘Wednesday’, ‘Thursday’, ‘Friday’, ‘Saturday’, ‘Sunday’];
$valid_days = get_post_meta( get_the_ID(), ‘valid_days’, true );
if ( ! is_array( $valid_days ) ) {
$valid_days = [];
}
?>
<input type="checkbox" name="valid_days[]" value="”
/>
Open
Last updated: October 24, 2024
0 comments
Log in to comment on this feature request.