Deprecated Notice in WooCommerce Module – PHP 8.1 Compatibility

#850440
  • Resolved Duvar Kağıdı
    Rank Math free

    Dear Rank Math Support Team,

    I hope this message finds you well.

    I am experiencing a deprecated notice in my WordPress site related to the Rank Math SEO plugin’s WooCommerce module. The issue arises with the strpos() function when passing null as an argument, which is deprecated in PHP 8.1 and later versions. Here are the details from my error log:

    vbnet
    Kodu kopyala
    [04-Aug-2024 16:50:37 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 130
    [04-Aug-2024 16:50:37 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 135
    To temporarily address this issue, I have modified the class-woocommerce.php file to ensure that the variables passed to strpos() are not null. However, I believe this should be handled in the official plugin code to ensure compatibility with PHP 8.1 and future versions.

    Could you please look into this issue and provide an update or a patch to fix it?

    Thank you for your attention to this matter. I look forward to your response.

    Best regards,
    Selçuk Göktekin

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    We apologize for the issue you are facing with the deprecated notice in the WooCommerce module of the Rank Math SEO plugin. Thank you for bringing this to our attention and for your proactive approach in modifying the code temporarily.

    The deprecated notice regarding the strpos() function is indeed something that needs to be addressed for compatibility with PHP 8.1 and later versions. We appreciate your feedback, and we will ensure that our development team is made aware of this issue so they can work on a fix in a future update.

    In the meantime, if you have any further questions or need assistance, please feel free to reply to this ticket, and a human agent from our support team will assist you further.

    Thank you for your understanding and patience as we work to resolve this matter!

    Sources:
    This Plugin Does Not Work with Your Version of PHP » Rank Math

    Güncelleme yapıldığında bana bir eposta gönderebilirseniz sevinirim.

    Hello,

    Thank you for contacting support.

    This issue has been merged into the plugin code in our repository and it should be released soon. We suggest keeping an eye on our changelog to see when that happens: https://rankmath.com/changelog

    Don’t hesitate to get in touch if you have any other questions.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

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

The ticket ‘Deprecated Notice in WooCommerce Module – PHP 8.1 Compatibility’ is closed to new replies.