Sync unpaid bookings to Google Calendar

Extend WooCommerce Bookings’ Google Calendar integration to include bookings when they enter the Unpaid status. By default, Bookings syncs bookings when they enter Confirmed, Paid, or Complete.

Note:

This is a Developer level doc. If you are unfamiliar working with code and resolving potential conflicts, we recommend you work with a Woo Agency Partner for larger projects, or find a WooCommerce developer on Codeable for smaller customizations. We are unable to provide support for customizations under our Support Policy.

Before you begin

↑ Back to top

Connect WooCommerce Bookings to a Google Calendar and test this customization on a staging site. This filter changes which booking statuses the calendar integration treats as eligible for synchronization; it does not record a payment or change the booking’s status. Events can contain booking and customer information, so limit access to the connected calendar.

Include unpaid bookings

↑ Back to top

Add this code to a custom plugin or your child theme’s functions.php file:

/**
 * Allow unpaid bookings to sync to Google Calendar.
 *
 * @param string[] $statuses Booking statuses eligible for calendar sync.
 * @return string[]
 */
function example_sync_unpaid_bookings_to_google( $statuses ) {
	$statuses[] = 'unpaid';
	return array_unique( $statuses );
}
add_filter( 'woocommerce_booking_is_paid_statuses', 'example_sync_unpaid_bookings_to_google' );

With the snippet active, create a test booking that enters Unpaid status and confirm that its event appears on the connected calendar. Review the event’s details and test the booking workflow before using this on a live store. This snippet does not perform a bulk sync of existing bookings.

Questions and support

↑ Back to top

Something missing from this documentation? Still have questions and need assistance?

  • If you have a question about a specific extension or theme you’d like to purchase, contact us to get answers.
  • If you already purchased this product and need some assistance, get in touch with a Happiness Engineer via our support page and select this product’s name from the Product dropdown.

Related Products

WooCommerce Subscriptions is a WooCommerce extension that lets customers subscribe to your products or...

Power your membership association, online magazine, elearning sites, and more with access control to...

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.