I updated the old version of WooCommerce Predictive Search Plugin with latest version and it produced the PHP fatal error:
Parse error: syntax error, unexpected ‘.’, expecting ‘,’ or ‘;’ in /htdocs/wp-content/plugins/woocommerce-predictive-search/admin/admin-ui.php on line 37
I thought that Plugin’s files are not updated properly. So I downloaded the latest version from WordPress repository and uploaded the plugin via FTP. But PHP fatal error is not resolving.
Finally I opened the admin-ui.php file and replaced the following PHP code
1 2 3 |
public $google_api_key_option = WOOPS_KEY . '_google_api_key'; public $toggle_box_open_option = WOOPS_KEY . '_toggle_box_open'; public $version_transient = WOOPS_KEY . '_licinfo'; |
WITH
1 2 3 |
public $google_api_key_option = 'woo_predictive_search_google_api_key'; public $toggle_box_open_option = 'woo_predictive_search_toggle_box_open'; public $version_transient = 'woo_predictive_search_licinfo'; |
It worked like a charm and fixed the issue.
Leave a Reply