• Resolved Argentum

    (@argentum)


    Hi,
    I am trying to get an old Woocommerce installation up to date. I have deleted the Woocommerce Blocks plugin. But I still get this:

    Action required: Critical vulnerabilities in WooCommerce Blocks
    In response to a critical vulnerability identified on July 13, 2021, we are working with the WordPress Plugins Team to deploy software updates to stores running WooCommerce (versions 3.3 to 5.5) and the WooCommerce Blocks feature plugin (versions 2.5 to 5.5).

    Our investigation into this vulnerability is ongoing, but we wanted to let you know now about the importance of updating immediately.

    For more information on which actions you should take, as well as answers to FAQs, please urgently review our blog post detailing this issue.

    Earlier today I was going to use WP-CLI to change urls but I encountered an error. Could this be related to this plugin?

    Parse error: syntax error, unexpected ‘:’, expecting ‘{‘ in /storage/public_html/site/wp-content/plugins/woocommerce/woocommerce.php on line 57

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Ryan Ray, a11n

    (@ryanr14)

    Hi @argentum,

    I believe the issue here at hand is that you’ve deleted the WooCommerce Blocks plugin and are still seeing the “Action required: …” message?

    In addition to that you were trying to use WP-CLI to update the URLs found in Settings > General but received an error doing so?

    Thread Starter Argentum

    (@argentum)

    Hi.
    I dismissed the warning message. I reinstalled the Woocommerce Block plugin, thinking that perhaps the plugin being in place would fix the error with WP-CLI. But I still get the critical error when I try to dry run a wp-cli command.

    I’ve searched for errors on the internet. There is quite a few people having or had this problem.
    Parse error: syntax error, unexpected ‘:’, expecting ‘{‘ in /plugins/woocommerce/woocommerce.php on line 57

    It’s this code in woocommerce.php

    /**
     * Returns the WooCommerce PSR11-compatible object container.
     * Code in the <code>includes</code> directory should use the container to get instances of classes in the <code>src</code> directory.
     *
     * @since  4.4.0
     * @return \Psr\Container\ContainerInterface The WooCommerce PSR11 container.
     */
    function wc_get_container() : \Psr\Container\ContainerInterface {
    	return $GLOBALS['wc_container'];
    }

    Could the error be related to the Woocommerce Block plugin?

    Hi @argentum,

    The error you are reporting is a strong signal that the version of PHP executing in your environment is not supporting the return type declaration syntax (the part beginning with the colon after the wc_get_container function declaration).

    WooCommerce core requires PHP 7 or greater. Since you mentioned you are encountering this when running WP-CLI, it’s possible your environment is using a lower version of PHP for command line execution (it’s possible to have different versions of PHP running for web and cli).

    Since this is not a WooCommerce Blocks issue, I’m going to mark this thread as resolved.

    Thread Starter Argentum

    (@argentum)

    All right, that was new to me. I will get the hosting provider to come up with an answer. Thanks!

    Plugin Support Ryan Ray, a11n

    (@ryanr14)

    Hi @argentum,

    Hopefully an update to your sites PHP version is the fix. Even if not getting your site using the latest version of PHP 7 would be a great idea. There’s many performance and security improvements getting on version 7.

    Let us know either way, thanks!

    Thread Starter Argentum

    (@argentum)

    The page is running on php 7.4, but WP-CLI still runs on 5.6. Hosting support suggested I tried to enter /usr/local/php74/bin/php /usr/local/bin/wp in an SSH command window.
    But that gives me a shipload of errors.
    Deprecated: implode(): Passing glue string after array is deprecated. Swap the parameters in phar:///usr/local/bin/wp/php/WP_CLI/DocParser.php on line 70

    Thanks anyways!

    Thanks for updating in here! Other users with similar issues might benefit from your report. Based on your latest update, the errors suggests to me that your host may also have an older version of wp-cli installed in their environment which may also be why it’s executing using an older version of PHP (An older version of wp-cli may not fully support newer versions of PHP).

    Either way, this is definitely an issue not related to either WooCommerce or Woo Blocks and is something you should continue working with your host on.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to remove this plugin’ is closed to new replies.