Conflict with Custom Functions for Buddypress, bbbpress and Woocomerce
-
Thanks for your awesome plugin.
My issue is quite unique and kindly assist if possible
I successfully set up the plugin settings and deactivated woocommerce,bbpress and buddypress on my home page. I realized that the homepage returns error “The page isn’t working. Site is currently unable to handle this request. HTTP ERROR 500′My site is membership site with the following plugins
Wordpress: 4.5.2
Buddypress: 2.5.2
Bbpress : 2.5.8
Woocomerce: 2.5.5
Groups by itthinx: 1.10.2 // as the restriction plugin
theme : twenty sixteenThis is all the trouble shooting I did.
I reset the page back to defaults — Pages Loads fine
Tried putting other plugins except woocoomerce, buddypress and bbpress –pages loads fine
I tried switching off the three plugins on different pages —Same error.
Tried deactivating all plugins one by one and also keeping just one plugin active with plugin organizer –same loading error.
Change themes back to twenty sixteen and fifteen—same error.
Reinstalled wordpress– same error.
Unchecked all options in plugin organizer except Selective Plugin Loading.–same error
Set up wordpress on a new dev sit and even on local install — same error persists.Then I deleted all functions in my functions.php and wow– plugin organizer now works with buddypress, bbpress and woocomece off. I went down to isolate the specific functions that casued the conflict and error with plugin organizer. They were functions related to woocomerce, buddpress and wordpress.
In summary all my functions to restrict buddypress to members and woocommerce functions eg translate and gettext functions when active in functions.php causes the error.I have currently deactivated plugin organizer and now using dequeue functions to remove scripts and plugins from pages. Below are my functions.
Can you suggest possible ways to resolve the conflict and get plugin organizer working on my setup?Thanks in advance.
// Restrict access to buddypress pages function bpfr_guest_redirect() { global $bp; if( bp_is_activity_component() || bp_is_groups_component() || bp_is_blogs_component() || bp_is_directory() || bp_is_user() || bp_is_members_component() || is_bbpress() ) { // not logged in user - user will be redirect to join page if ( !is_user_logged_in() ) { wp_redirect( get_option('siteurl') . '/join' ); } } // If the user is a paid member if( bp_is_activity_component() || bp_is_groups_component() || bp_is_blogs_component() || bp_is_directory() || bp_is_user() || bp_is_members_component() || is_bbpress() ) { if( is_user_logged_in() && current_user_can('paid_member') ) { // groups capability paid_member return; } } if( bp_is_activity_component() || bp_is_groups_component() || bp_is_blogs_component() ) { if( is_user_logged_in() && current_user_can('free_member') ) { wp_redirect( get_option('siteurl') . '/memberships' ); } } } add_filter('get_header','bpfr_guest_redirect', 1 ); // Woocommerce Translate words function theme_sort_change( $translated_text, $text, $domain ) { if ( is_woocommerce() || is_shop() ) { switch ( $translated_text ) { case 'product' : $translated_text = __( 'item', 'theme_text_domain' ); break; } } return $translated_text; } // Translate 'Product' text to Name on Cart and Checkout Page // ========================================================================== add_filter( 'gettext', 'crowdinfund_text_strings', 20, 3 ); function crowdinfund_text_strings( $translated_text, $text, $domain ) { if( is_cart() || is_checkout() ) { switch ( $translated_text ) { case 'Product' : $translated_text = __( 'Name', 'theme_text_domain' ); break; } } return $translated_text; }
- The topic ‘Conflict with Custom Functions for Buddypress, bbbpress and Woocomerce’ is closed to new replies.