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.1.2
Flag for en_USFlag for en_GB
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

Your customers can choose their delivery dates on a per-product basis from a responsive calendar.

Multiple cart items are grouped together by delivery date at the checkout.

Each WooCommerce product can have its own set of delivery days available (e.g. Mondays and Thursdays), you can disable weekends across the site, and it’s hookable… so you can implement your own delivery date availability logic if you want to.

Date picker for product deliveries
Pick a preferred delivery date

Features

  • Great for stores selling fresh produce around big dates like Christmas and Thanksgiving
  • Include/exclude weekends and individual dates from being available for delivery
  • Includes a “Collect in Store” option
  • Configure available delivery date ranges store-wide, at product-level and for individual product-variations
  • Responsive pop-up calendar
  • Developer-friendly, so you can implement your own delivery date availability logic

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.1.2

Released: 2022-10-07

  • Replaced deprecated WooCommerce action hook with the newer woocommerce_checkout_create_order_line_item. There should be no functional difference in general use of the plugin.

Version 1.1.1

Released: 2022-10-07

  • Added a new option to copy cart item delivery method/date to the order item meta. Useful when you want to export product data from your WooCommerce orders.

Version 1.1.0

Released: 2022-09-29

Added a new option to the WooCommerce product editor, to make specific days of the week available/unavailable for delivery (at product-level).

Older releases

Minor update to support the newer version of the Power Plugins back-end updater.

  • Fixed problem with the date picker not rendering on simple products.
  • Fixed a typo in the admin area.
  • Updated JS to fix a problem after changing product variation.
  • Initial release

Reviews

There are no reviews yet.

Be the first to review “Custom Product Delivery Dates”

Your email address will not be published. Required fields are marked *