Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save woogists/832ac56e3125a779592a7f7d89021628 to your computer and use it in GitHub Desktop.
Save woogists/832ac56e3125a779592a7f7d89021628 to your computer and use it in GitHub Desktop.
[WooCommerce Bookings] Enable Big Selects to fix MAX_JOIN_SIZE errors
/**
* Will enable big selects when the host has a low threshold for MAX_JOIN_SIZE.
* This is sometimes the case with shared hosting.
*/
function enable_big_selects_for_bookings_20170825() {
global $wpdb;
$wpdb->query( 'SET SQL_BIG_SELECTS=1' );
}
add_action( 'init', 'enable_big_selects_for_bookings_20170825' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment