0

When I add a payment to an order ("New Payment" button), I'm getting an Fatal Error.

Fatal error: Call to undefined method Localize::convert_human_date_to_gmt() in /var/www/vhosts/domain/httpdocs/system/expressionengine/third_party/store/src/Store/Cp/OrdersController.php on line 342

What is causing this? Already update Expresso store to the latest version 2.3.1.

1

Exp:resso Store since 2.3.0 requires that you are running ExpressionEngine 2.8+. What version of EE are you running?

If you're using 2.6+ than Store is using a now depreciated function. On line 342, you should see something like:

$this->ee->localize->convert_human_date_to_gmt($var);

Change it to:

ee()->localize->string_to_timestamp($var);

If you're unsure what you need to modify (as I don't have access Store's source code) post the full line #342 from OrdersController.php.

  • Running EE version 2.8.0 – Timo002 Jul 10 '14 at 8:05
  • @Timo002 Ok, I've updated my post with how to fix this. Don't forget to file a bug report with the developer of Store. – Michael P Jul 10 '14 at 10:02
  • I finally came to a point of where I needed to fix this. I hoped updating EE and all Addons whould help. But it didn't. So I did you trick and it works like a charm! Only I also put $this-> this in front of your example code. – Timo002 Aug 21 '14 at 15:07
  • @Timo002 Don't add $this-> before the ee() function. Since 2.6 the ee() global function was added. – Michael P Aug 22 '14 at 0:28
  • ee-> gave an error. Don't know the exact error, but something like it didn't exist. Putting $this-> in front did work, running EE2.9 – Timo002 Aug 22 '14 at 5:42
1

I have encountered this problem as well it seems that EE (convert_human_date_to_gmt) deprecated this function in version 2.6.0 . I am not sure when the next store update will be rolling out to fix this issue but in the mean time you can change it to this (string_to_timestamp) instead

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.