Custom Product Delivery Dates

Product-level delivery date chooser for your WooCommerce store

Licences for this plugin need to be renewed annually.

SKU: N/A Category: Current: 1.0.4
money-back guarantee sticker


100% No-Risk, Money Back Guarantee!

We're excited to have you experience the power of our plugins. So over the next 14 days, if any Power Plugins aren’t the best fit for your project, simply reach out! We’ll happily refund 100% of your money. No questions asked.

About Custom Product Delivery Dates

Let your customers choose their delivery dates on a per-product basis in your WooCommerce store.

Features include:

  • Configure available delivery date ranges store-wide, at product-level and for individual product-variations.
  • Includes an easy-to-use responsive date-time chooser.
  • Easily exclude weekends and individual dates from being available for delivery.
  • Extend and customise functionality with WordPress hooks.
  • Includes a “Collect in Store” option.
  • Great for stores selling fresh produce around big dates like Christmas and Thanksgiving.
Date picker for product deliveries
Pick a preferred delivery date

Customising the Plugin

To you these snippets, make sure you’re using a custom child theme, then paste them into functions.php.

Custom Styles

Include a custom mini-stylesheet on single product pages that use the date chooser.

function custom_delivery_dates_enqueue_scripts() {
	$base_uri = get_stylesheet_directory_uri();
	$theme_version = wp_get_theme()->get('Version');

	if (function_exists('cpdd_are_custom_delivery_assets_required') && cpdd_are_custom_delivery_assets_required()) {
		wp_enqueue_style(
			'child-cpdd',
			get_stylesheet_directory_uri() . '/custom-delivery.css',
			null,
			$theme_version
		);
	}
}
add_action('wp_enqueue_scripts', 'custom_delivery_dates_enqueue_scripts');

…and add your custom styles into “custom-delivery.css”.

Dynamically Prevent Delivery Dates

This snippet will prevent Mondays from being available for deliveries.

/**
 * Given an input date (yyyy-mm-dd), return whether or not that date is
 * blocked-out of the delivery date picker as unavailable.
 */
function custom_cpdd_is_delivery_date_blocked($is_blocked, $date_string) {
	$date = new DateTime($date_string, wp_timezone());

	// PHP DateTime formatting:
	// https://www.php.net/manual/en/datetime.format.php
	$day_of_week = intval($date->format('N'));

	// Block Mondays
	if ($day_of_week == 1) {
		$is_blocked = true;
	}

	// More custom date-blocking conditions...
	// ...
	// ...

	return $is_blocked;
}
add_filter('cpdd_is_delivery_date_blocked', 'custom_cpdd_is_delivery_date_blocked', 10, 2);

Changelog: Custom Product Delivery Dates

Version 1.0.4

Released: 2022-03-28

  • Fixed problem with the date picker not rendering on simple products.

Version 1.0.3

Released: 2022-03-21

  • Fixed a typo in the admin area.

Version 1.0.2

Released: 2022-03-21

  • Updated JS to fix a problem after changing product variation.

Older releases

  • Initial release

Reviews

There are no reviews yet.

Be the first to review “Custom Product Delivery Dates”