• Resolved loganstrike

    (@loganstrike)


    When upgrading from 4.3.7 to 4.3.8, the following error occurs when navigating in WP admin.

    Uncaught Error: syntax error, unexpected ‘|’, expecting ‘;’ or ‘{‘
    in /www/wp-content/plugins/markup-by-attribute-for-woocommerce/src/utility/general.php on line 361

    Call stack:

    1. mt2Tech\MarkupByAttribute\Autoloader::autoload('mt2Tech\MarkupByAttribute\Utility\General')
    2. spl_autoload_call('mt2Tech\MarkupByAttribute\Utility\General')
      wp-content/plugins/markup-by-attribute-for-woocommerce/markup-by-attribute-for-woocommerce.php:162
    3. mt2Tech\MarkupByAttribute\mt2mba_main('')
      wp-includes/class-wp-hook.php:324
    4. WP_Hook::apply_filters('', array)
      wp-includes/class-wp-hook.php:348
    5. WP_Hook::do_action(array)
      wp-includes/plugin.php:517
    6. do_action('woocommerce_init')
      wp-content/plugins/woocommerce/includes/class-woocommerce.php:875
    7. WooCommerce::init('')
      wp-includes/class-wp-hook.php:324
    8. WP_Hook::apply_filters(NULL, array)
      wp-includes/class-wp-hook.php:348
    9. WP_Hook::do_action(array)
      wp-includes/plugin.php:517
    10. do_action('init')
      wp-settings.php:730
    11. require_once('/wordpress/wp-settings.php')
      wp-config.php:107
    12. require('/www/wp-config.php')
      wp-config.php:5
    13. require_once('/wordpress/wp-config.php')
      wp-load.php:50
    14. require_once('/wordpress/wp-load.php')
      wp-admin/admin.php:35
    15. require_once('/wordpress/wp-admin/admin.php')
      wp-admin/tools.php:40
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Mark Tomlinson

    (@marktomlinson)

    Uhg! The problem is that it is a PHP 8+ feature, and many sites are still running PHP 7.4. I didn’t realize it was such a new convention until you called it out.

    I can’t back out the release because it contains a major correction for European notation. But it may take up to 5 days before I can roll out a patch. My suggestion would be to download and install version 4.3.7, found here, until I can correct the code. If you can upgrade to PHP 8+, and that is something you want to do, that would resolve the issue for you as well. But that’s not something I’m asking anyone to do.

    My sincere apologies. I’ll roll out a correction as quickly as I can without introducing new problems.

    Plugin Author Mark Tomlinson

    (@marktomlinson)

    Sorry this is taking so long. Since PHP 7.4 was end-of-life in 2021, most Linux distros have stopped supporting it. Since this forced me to build a new test environment of an older Linux distro and PHP 7.4.3, I also set WordPress to 5.4.17 and WooCommerce back to version 3.9.0.

    I’ve started regression testing in this ‘way-back machine’ and am making good progress.

    Thanks for your patience.

    Plugin Author Mark Tomlinson

    (@marktomlinson)

    I’ve rolled out version 4.3.9, which should resolve the issue.

    Markup by Attribute now has tested compatibility down to:
    * PHP 7.4
    * WordPress 5.4
    * WooCommerce 3.9

    Thread Starter loganstrike

    (@loganstrike)

    The upgrade worked without issue. Thanks!

    Plugin Author Mark Tomlinson

    (@marktomlinson)

    🙂

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

You must be logged in to reply to this topic.