Created
October 2, 2020 14:20
-
-
Save kimcoleman/64ee06a1cec1661e9def70d38bae4d45 to your computer and use it in GitHub Desktop.
Allow large JOIN operations in the Member Directory and Profiles Add On for Paid Memberships Pro.
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
<?php | |
/* | |
* Allow large JOIN operations in the Member Directory and Profiles Add On for Paid Memberships Pro. | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
* | |
*/ | |
function pmpromd_set_db_option() { | |
global $wpdb; | |
$wpdb->query( "SET SESSION SQL_BIG_SELECTS=1" ); | |
} | |
add_action( 'init', 'pmpromd_set_db_option', 5 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment