• Resolved newshop

    (@newshop)


    Hello, I get the following notice in debug.log:

    [30-Nov-2023 11:43:07 UTC] PHP Deprecated:  str_contains(): Passing null to parameter #1 ($haystack) of type string is deprecated in [...]/wp-includes/shortcodes.php on line 246
    

    I made several tests with enabling/disabling plugins and came to the result that this notice is caused by Back in Stock Notifier. I am using php version 8.1

    Any help about how to fix that would be great.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter newshop

    (@newshop)

    Also, when activating the Unsubscribe-Addon, there is an additional notice:

    PHP Deprecated:  The function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead in [...]/wp-includes/functions.php on line 6031
    • This reply was modified 11 months, 4 weeks ago by newshop.
    Plugin Support CodeWooGeek Support

    (@codewoogeeksupport)

    Hello there,

    Good Day!!

    Could you please confirm the version of our plugin “Back In Stock Notifier for WooCommerce” you are currently using? If it’s not the latest version, we recommend updating to the latest version to see if the issue persists.

    Additionally, could you please provide a screenshot of the error or more details for further analysis?

    Regarding the Unsubscribe Add-on, we’d like to inform you that support for premium plugins is not allowed in this forum. For assistance, kindly contact our dedicated helpdesk/visit our website. Our team will be happy to assist you and provide a solution to resolve the deprecated notice.

    Thanks.

    Thread Starter newshop

    (@newshop)

    Hello,

    I am using the latest version (5.1.0). Please find a screenshot of my debug.log here:

    https://ibb.co/0rkcPCH

    As said, when disabling Back in stock notifier, the notice disappears. So I am pretty sure that the notice is caused by your plugin.

    Thank you in advance.

    trektor

    (@trektor)

    Hi, replace content in line number 48 (file wp-content/plugins/back-in-stock-notifier-for-woocommerce/includes/frontend/class-product.php) the old line :

    echo do_shortcode( $this->display_subscribe_box( $product, array(), $display_filter ) );

    with:

    echo do_shortcode( $this->display_subscribe_box( $product, array(), $display_filter ) ?? '');
    Thread Starter newshop

    (@newshop)

    Thank you, that fixed it.

    @codewoogeeksupport Can you please include this fix in the next update?

    Plugin Support CodeWooGeek Support

    (@codewoogeeksupport)

    Hello,

    Thank you for the heads-up, @trektor.

    We are pleased to inform you that we will include this fix in our next official update, which will be available shortly.

    Thanks.

    Thank you @newshop for creating this error report and @trektor for the fix. Confirmed working on WP 6.4.2 WC 8.4.0 Back In Stock 5.1.0 PHP 8.1.27

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘PHP Deprecated’ is closed to new replies.