Thread Starter
lukek
(@lukek)
Hi,
Look forward to response on this one.
Also, FYI, I commented out the block of code in question (as appeared to only be relevant to WP Staging Pro and not the non-paid version at this stage).
And now returns the below error.
“Plugin could not be activated because it triggered a fatal error.
Parse error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or ‘{‘ or ‘$’ in /home/xxxxxxxx/public_html/wp-content/plugins/wp-staging/Core/WPStaging.php on line 337”
Look forward to reply.
Thank you,
Luke
PS. Code section that was commented out is:
/**
* Do not show update notifications for WP Staging Pro on the staging site
* @todo Move this to separate class wpstaging/Core/Wpcore/PluginUpdateNotify()
* @param type object
* @return object
*/
/*if ( !function_exists( ‘wpstg_filter_plugin_updates’)) {
function wpstg_filter_plugin_updates($value)
{
if (wpstg_is_stagingsite()) {
if (isset($value->response[‘wp-staging-pro/wp-staging-pro.php’])) {
unset($value->response[‘wp-staging-pro/wp-staging-pro.php’]);
}
}
return $value;
}
}*/
Thread Starter
lukek
(@lukek)
When ALL website plugins are deactivated the error below (the same as above) still stands:
“Plugin could not be activated because it triggered a fatal error.
Parse error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or ‘{‘ or ‘$’ in /home/pbvisual/public_html/wp-content/plugins/wp-staging/Core/WPStaging.php on line 337”
Look forward to your reply.
Thanks,
Luke
Thread Starter
lukek
(@lukek)
Ok, so I updated the version of php and the plugin activated successfully. Just in case anyone else comes across this same error.
Have a good day!
Luke
Hi @lukek
I am sorry about the delay.
As you have already figured out the issue has been caused by your PHP version.
The minimum PHP version must be 5.5
Good to see that you were able to bypass it.
Cheers
René