Created
March 9, 2018 16:24
-
-
Save woogists/832ac56e3125a779592a7f7d89021628 to your computer and use it in GitHub Desktop.
[WooCommerce Bookings] Enable Big Selects to fix MAX_JOIN_SIZE errors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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