• Resolved wurzelsepp1

    (@alexprepo)


    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

    (@babylon1999)

    Hello @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: 

    Look forward to hearing back from you.

    Thread Starter wurzelsepp1

    (@alexprepo)

    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

    (@alexprepo)

    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 832
    PHP Parse error: syntax error, unexpected ‘)’ in wp-content/plugins/woocommerce/src/Internal/DataStores/Orders/CustomOrdersTableController.php on line 494
    PHP Parse error: syntax error, unexpected ‘)’ in wp-content/plugins/woocommerce/src/Internal/DataStores/CustomMetaDataStore.php on line 218
    PHP Parse error: syntax error, unexpected ‘)’ in wp-content/plugins/woocommerce/src/Internal/Admin/WcPayWelcomePage.php on line 417
    PHP Parse error: syntax error, unexpected ‘)’ in wp-content/plugins/woocommerce/includes/admin/settings/class-wc-settings-shipping.php on line 352
    PHP Parse error: syntax error, unexpected ‘)’ in wp-content/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-variations-controller.php on line 877
    PHP Parse error: syntax error, unexpected ‘)’ in wp-content/plugins/woocommerce/src/Admin/API/ProductsLowInStock.php on line 78
    PHP Parse error: syntax error, unexpected ‘)’ in wp-content/plugins/woocommerce/src/Admin/API/ProductsLowInStock.php on line 211
    PHP Parse error: syntax error, unexpected ‘)’ in wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Utilities/OrderController.php on line 215
    PHP Parse error: syntax error, unexpected ‘)’ in wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Utilities/OrderController.php on line 526
    PHP 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

    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 48
    Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website.

    I just had the host upgrade the PHP to 7.4 for the CLI and it received the same error.

    Hey, @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!

    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.