Search code examples
phppaypalpaypal-rest-sdk

Class "String" not found error in PayPal core sdk


I am getting the following error all of sudden

Fatal error: Class 'string' not found in \vendor\paypal\sdk-core-php\lib\PayPal\Common\PPModel.php on line 51

Did anything change in recent Wordpress update?


Solution

  • Around March, 2015, PayPal made some big changes with PHP-SDK 1.0.0 Part of that change was renaming some classes; PPModel.php was changed to PayPalModel.php

    There were a lot of other files renamed. Here is a link to all the breaking changes.

    https://github.com/paypal/PayPal-PHP-SDK/wiki/Breaking-Changes---1.0.0

    You will probably have a lot more work to do, other than just PPModel. I know I had to change 23 files and 73 lines of code. This is because a lot of class files were renamed.