Title: WP CLI / Syntax errors in source code
Last modified: January 8, 2024

---

# WP CLI / Syntax errors in source code

 *  Resolved [wurzelsepp1](https://wordpress.org/support/users/alexprepo/)
 * (@alexprepo)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/wp-cli-syntax-errors-in-source-code/)
 * Hi Woo-Devs,
 * we experience problems with Woo and WP CLI due to syntax errors in your source
   code. After nearly every update we need to fix that.
 * These bugs cause WP CLI not to work. Instead it shows the errors – mostly unclosed
   structures or comma, that should not be teher.
 * Could you fix that please?
 * Best regards,
 * alex

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Saif](https://wordpress.org/support/users/babylon1999/)
 * (@babylon1999)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/wp-cli-syntax-errors-in-source-code/#post-17326636)
 * Hello [@alexprepo](https://wordpress.org/support/users/alexprepo/),
   Thank you
   for reaching out!
 * > These bugs cause WP CLI not to work. Instead it shows the errors – mostly unclosed
   > structures or comma, that should not be teher.
 * Could you please provide step-by-step instructions on how to replicate this issue?
   Additionally, what’s the behaviour you’re currently experiencing, and what do
   you expect to see instead?
 * It would be great if you could attach a few screenshots as well.
 * If you don’t already have a screenshot service installed, here are a few free
   options: 
    - [https://snipboard.io](https://snipboard.io/)
    - [http://skitch.com/](http://skitch.com/)
    - [http://getcloudapp.com/](http://getcloudapp.com/)
 * Look forward to hearing back from you.
 *  Thread Starter [wurzelsepp1](https://wordpress.org/support/users/alexprepo/)
 * (@alexprepo)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/wp-cli-syntax-errors-in-source-code/#post-17335564)
 * This is the error, happening:
 * PHP Parse error:  syntax error, unexpected ‘)’ in /var/www/vhosts/buecherstubedraht.
   de/shop.buecherstubedraht.de/wp-content/plugins/woocommerce/includes/admin/helper/
   class-wc-helper-subscriptions-api.php on line 228
 * It happens when you use WP CLI
 * To reproducte it, just type any command WP <something>
 * Btw:
   Could you do at least basic testing before releasing a new version?
 * Even the latest version has the error again. This causes a lot of work to the
   people who needs to fix that in the live systems ..
 * Best regards,
   Alex
 *  Thread Starter [wurzelsepp1](https://wordpress.org/support/users/alexprepo/)
 * (@alexprepo)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/wp-cli-syntax-errors-in-source-code/#post-17335636)
 * and this is the complete list of bugs, we had to fix in the atual release:
 * PHP Parse error: syntax error, unexpected ‘)’ in wp-content/plugins/woocommerce/
   src/Database/Migrations/CustomOrderTable/CLIRunner.php on line 761
   PHP Parse 
   error: syntax error, unexpected ‘)’ in wp-content/plugins/woocommerce/src/Database/
   Migrations/CustomOrderTable/CLIRunner.php on line 832PHP Parse error: syntax 
   error, unexpected ‘)’ in wp-content/plugins/woocommerce/src/Internal/DataStores/
   Orders/CustomOrdersTableController.php on line 494PHP Parse error: syntax error,
   unexpected ‘)’ in wp-content/plugins/woocommerce/src/Internal/DataStores/CustomMetaDataStore.
   php on line 218PHP Parse error: syntax error, unexpected ‘)’ in wp-content/plugins/
   woocommerce/src/Internal/Admin/WcPayWelcomePage.php on line 417PHP Parse error:
   syntax error, unexpected ‘)’ in wp-content/plugins/woocommerce/includes/admin/
   settings/class-wc-settings-shipping.php on line 352PHP Parse error: syntax error,
   unexpected ‘)’ in wp-content/plugins/woocommerce/includes/rest-api/Controllers/
   Version3/class-wc-rest-product-variations-controller.php on line 877PHP Parse
   error: syntax error, unexpected ‘)’ in wp-content/plugins/woocommerce/src/Admin/
   API/ProductsLowInStock.php on line 78PHP Parse error: syntax error, unexpected‘)’
   in wp-content/plugins/woocommerce/src/Admin/API/ProductsLowInStock.php on line
   211PHP Parse error: syntax error, unexpected ‘)’ in wp-content/plugins/woocommerce/
   packages/woocommerce-blocks/src/StoreApi/Utilities/OrderController.php on line
   215PHP Parse error: syntax error, unexpected ‘)’ in wp-content/plugins/woocommerce/
   packages/woocommerce-blocks/src/StoreApi/Utilities/OrderController.php on line
   526PHP Parse error: syntax error, unexpected ‘)’ in wp-content/plugins/woocommerce/
   includes/wccom-site/rest-api/endpoints/class-wc-rest-wccom-site-ssr-controller.
   php on line 53
 *  [WebsThatRock](https://wordpress.org/support/users/websthatrock/)
 * (@websthatrock)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/wp-cli-syntax-errors-in-source-code/#post-17488315)
 * Hello, using CLI PHP version PHP 7.3.33 and WooCommerce version 8.22 and tested
   again on version 8.6.1 when trying to run the CLI I get these error messages.
   Is this a bug that needs to be reported? Do I need CLI to use version PHP 7.4?
 * Michael
 * When testing with WooCommerce 8.22 I get this error.
 * Parse error: syntax error, unexpected ‘?’, expecting function (T_FUNCTION) or
   const (T_CONST) in /home/mtgshopp/public_html/wp-content/plugins/wp-all-import-
   pro/addon-api/classes/helpers.php on line 241
   Error: There has been a critical
   error on this website.Learn more about troubleshooting WordPress. There has been
   a critical error on this website.[mtgshopp@cloud-9dc319 pub
 * When testing with WooCommerce 8.6.1 I get this error.
 * arning: class_implements(): Class Automattic\WooCommerce\Internal\TransientFiles\
   TransientFilesEngine does not exist and could not be loaded in /home/mtgshopp/
   public_html/wp-content/plugins/woocommerce/src/Internal/DependencyManagement/
   ServiceProviders/AbstractInterfaceServiceProvider.php on line 34
   Parse error:
   syntax error, unexpected ‘LegacyProxy’ (T_STRING), expecting function (T_FUNCTION)
   or const (T_CONST) in /home/mtgshopp/public_html/wp-content/plugins/woocommerce/
   src/Internal/TransientFiles/TransientFilesEngine.php on line 48Error: There has
   been a critical error on this website.Learn more about troubleshooting WordPress.
   There has been a critical error on this website.
 *  [WebsThatRock](https://wordpress.org/support/users/websthatrock/)
 * (@websthatrock)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/wp-cli-syntax-errors-in-source-code/#post-17488407)
 * I just had the host upgrade the PHP to 7.4 for the CLI and it received the same
   error.
 *  [carolm29 (woo-hc)](https://wordpress.org/support/users/carolm29/)
 * (@carolm29)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/wp-cli-syntax-errors-in-source-code/#post-17488685)
 * Hey, [@websthatrock](https://wordpress.org/support/users/websthatrock/)!
 * Per WordPress forum guidelines, would you mind opening up a new thread for this
   so that we can keep things organized and offer more personalized support for 
   you? We’ll be happy to help you out with this over there!
 * Have a wonderful day!
 *  [WebsThatRock](https://wordpress.org/support/users/websthatrock/)
 * (@websthatrock)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/wp-cli-syntax-errors-in-source-code/#post-17494419)
 * Just did. Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘WP CLI / Syntax errors in source code’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [wp-cli](https://wordpress.org/support/topic-tag/wp-cli/)

 * 7 replies
 * 4 participants
 * Last reply from: [WebsThatRock](https://wordpress.org/support/users/websthatrock/)
 * Last activity: [2 years, 1 month ago](https://wordpress.org/support/topic/wp-cli-syntax-errors-in-source-code/#post-17494419)
 * Status: resolved