Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save woogists/1fc4b32ecdf2a5a09ed5b8e749f4dd11 to your computer and use it in GitHub Desktop.
Save woogists/1fc4b32ecdf2a5a09ed5b8e749f4dd11 to your computer and use it in GitHub Desktop.
[WooCommerce Bookings] Modify when In Cart bookings expire
/**
* Will change the minutes it takes an In Cart booking to expire.
* This example reduces the number from 60 to 30.
*
* @param int $minutes 60 is the default passed
* @return int The amount of minutes you'd like to have In Cart bookings expire on.
*/
function change_incart_bookings_expiry_minutes_20170825( $minutes ) {
return 30;
}
add_filter( 'woocommerce_bookings_remove_inactive_cart_time', 'change_incart_bookings_expiry_minutes_20170825' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment