I’m new to this forum so not so sure if I’m posting in the right place or about the full rules and regulations of the forum system, so if I’ve got something wrong please redirect me and let me know.
Basically, I’m receiving a parse error when trying to go onto our website – I had tried restoring my website from an old backup and now it’s giving me this error:
Parse error: syntax error, unexpected ‘exit’ (T_EXIT) in /home/cdchk/domains/dev.cdchk.org/public_html/wp-content/plugins/woocommerce-catalog/include/php/settings.php on line 1
I tried looking into this file (settings.php under the WooCommerce Catalog Plugin files), but am lost as to what the error is. I will post the first section of the code below. Let me know if there’s an issue. Thanks.
<?php
if (!defined('ABSPATH')) exit;
class Woo_Catalog_Settings
{
private $dir;
private $file;
private $assets_dir;
private $assets_url;
private $settings_base;
private $settings;
public
function __construct($file)
{
$this->file = $file;
$this->dir = dirname($this->file);
$this->assets_dir = trailingslashit($this->dir) . 'include';
$this->assets_url = esc_url(trailingslashit(plugins_url('/include/', $this->file)));
$this->settings_base = 'woo_Catalog_';
// Initialise settings
add_action('admin_init', array(
$this,
'init'
));