Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@kimcoleman
Created October 2, 2020 14:20
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 kimcoleman/64ee06a1cec1661e9def70d38bae4d45 to your computer and use it in GitHub Desktop.
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.
<?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