Parse error: syntax error

Hi there,

I was trying to follow instructions from this blog post on how to change WooCommerce: http://gerhardpotgieter.com/2014/02/13/woocommerce-2-1-variation-prices-revert-to-2-0-format/

I copied and pasted the code into the function.php file as advised, and now have this error coming up:

Parse error: syntax error, unexpected ‘<’ in /home/neuthcom/public_html/wp-content/themes/sparkling/functions.php on line 280

I erased all of the text on the function.php file and tried to update the file, but continue to receive this message. I then deleted everything, downloaded the theme file from ColorLib, copied the functions.php text from there and pasted it, but still the same Parse error is coming up.

Do you have any suggestions on how to get my website back? It is now fully down and I am a bit freaked out.

Thanks so much in advance for your help.

Try to replace all theme files via FTP not just one single file. This won’t erase any changes done via Theme Options but will restore only broken files.

As you can see from comment thread on that post everyone is reporting the same problem with that code, so most likely it is no longer working as of latest WooCommerce version. However, as it is mentioned in your error code “<” is to blame which means that you have used bracket wrong which is not a big deal. Might be that you tried to use another PHP open tag in already opened PHP function which is very likely. Whatever is the reason, just replace theme files and you should be ready to go.