FosterCommerce / klaviyoconnect

A plugin for Craft CMS. Grow your ecommerce business with smarter email automations.
https://klaviyoconnect.fostercommerce.com/
Other
10 stars 10 forks source link

Cart Contoller - ParseError #113

Closed mcjackson18 closed 1 year ago

mcjackson18 commented 1 year ago

PHP: 7.4.33 Craft Version: 3.7.51 Klaviyo Connect: 4.0.161

Hi,

We're getting the following error when trying to restore a cart using the /actions/klaviyoconnect/cart/restore action.

ParseError: syntax error, unexpected '|', expecting variable (T_VARIABLE) in /var/www/html/vendor/fostercommerce/klaviyoconnect/src/controllers/CartController.php:13

I believe it's to do with type hinting as the '|' can only be used in PHP 8.

Thanks

peteeveleigh commented 1 year ago

Hi @mcjackson18 Sorry about this. We are looking to push a fix up for this asap. You're correct about the cause.

peteeveleigh commented 1 year ago

@mcjackson18 I've just made a release for 4.0.16.2 which should fix this problem

mcjackson18 commented 1 year ago

Great, thanks @peteeveleigh.

peteeveleigh commented 1 year ago

Just a note for you. There was a mess up with released version numbers (my bad). 4.0.161 should have been 4.0.16.1 So the new released version is 14.0.16.2 I have removed the old releases but the plugin store is still showing 14.0.161 as the most recent version. If you find that you can't install the new version from there, try installing directly from composer with composer require fostercommerce/klaviyoconnect That installs the latest version (just tested to confirm)