Product Icon

Smart Coupons for WooCommerce

The original all-in-one WooCommerce coupons plugin for advanced discount rules, gift cards, store credits, BOGO deals, dynamic pricing, bulk coupon codes, URL coupons and targeted promotions.

Coupon Valid on Days

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="”
/>

Author

ukcandybox

Current Status

Open

Last updated: October 24, 2024

0 comments

Log in to comment on this feature request.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.