• Resolved MarcoBortolotti

    (@marcobortolotti)


    Hi,
    it looks like your WooCommerce Wholesale Prices plugin is giving an Error after the latest WordPress/Plugin update:

    Parse error: syntax error, unexpected ‘=’, expecting ‘)’ in /var/www/siti/biosieri/html/wp-content/plugins/woocommerce-wholesale-prices/includes/class-wwp-duplicate-product.php on line 182

    Is it just me or is it a known issue.
    Is there anything I can do?
    Thank you for your help.

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

    (@vincentjames501)

    +1. We just ran into this as well. I just fixed it by doing this:

    
    $product_children = $product->get_children();
    if ( ! empty ( $product_children ) ) {
    

    instead of

    
    if ( ! empty ( $product_children = $product->get_children()) ) {
    
    Thread Starter MarcoBortolotti

    (@marcobortolotti)

    Thank you @vincentjames501.
    Of course it would be nicer if a fix were released.

    Plugin Author Josh Kohlbach

    (@jkohlbach)

    Hi guys,

    This looks like a PHP notice due to the usage of empty with a return value which is a problem on pre-Php 5.6 versions.

    Can you confirm for me which PHP version you are on?

    To update to 5.6+ check your hosting control panel or contact your host.

    I’ll have one of the devs check this out and we will release a patch early next week at the latest.

    Cheers,
    Josh

    Thread Starter MarcoBortolotti

    (@marcobortolotti)

    Hi Josh, my PHP version is definitely older than 5.6 (I’d say 5.4.4).
    Not sure I can update it, though.
    Do you think the patch will work with older versions of PHP?

    Plugin Author Josh Kohlbach

    (@jkohlbach)

    Hi Marco,

    We officially support 5.4+ but as with WooCommerce core we recommend 5.6 as the recommended min.

    This bug must have slipped through in our testing unfortunately, my apologies!

    The patch we release will ensure that it will work with 5.4 but your best course of action right now would be to contact your host and upgrade to 5.6. 5.4 technically isn’t actually supported by the PHP team anymore, even for security patches (5.4 version is over a decade old).

    Hope you can get a quick resolution via your host otherwise please feel free to manually apply the code change as suggested by Vincent above and then once the patch comes through you should be fine to update.

    Cheers,
    Josh

    Plugin Author Josh Kohlbach

    (@jkohlbach)

    Hi guys,

    UPDATE: We have released a patch version 1.4.5, please go ahead and update and this will correct the error.

    Just reiterate this was a PHP 5.4 specific syntax error. I highly recommend anyone using PHP 5.4 to update to at least PHP 5.6, preferably PHP 7+.

    Thanks for your patience and sorry for the inconvenience.

    Cheers,
    Josh

    Thread Starter MarcoBortolotti

    (@marcobortolotti)

    Thank you Josh!

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

The topic ‘Error after latest update’ is closed to new replies.