Conflict with another plugin – proposed fix
-
Hi there. I was having a conflict with another plugin (PublishPress: Revisions) which kept throwing a fatal error when I would approve a revision to a post.
PHP Fatal error: Uncaught Error: Call to undefined function ACFFrontend\\Module\\get_current_screen() in /wp-content/plugins/acf-frontend-form-element/includes/acf-field-settings/module.php:1306
Line 1306 shows this:
$current_screen = get_current_screen();I wrapped Lines 1306-1313 in an if statement like so:
if( function_exists( ‘get_current_screen’) ) {
$current_screen = get_current_screen();if ( isset( $current_screen->post_type ) && $current_screen->post_type == ‘acfef_payment’ ) {
return $field_group;
} elseif ( isset( $current_screen->id ) && $current_screen->id == $acfef_settings ) {
return $field_group;
} else {
return false;
}
}This solved my conflict. Could you consider including this fix in a future release?
- The topic ‘Conflict with another plugin – proposed fix’ is closed to new replies.