Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.