• Hey,

    Currently we’re seeing the deprecation notice during the checkout. It goes as follows:
    “PHP message: The WC_Cart->tax_display_cart argument is deprecated since version 4.4. Use WC_Cart->get_tax_price_display_mode() instead”

    I believe this is coming from this file:
    sendcloud-shipping/includes/shipping/class-service-point-shipping-method.php on line: 74.

    Can you guys update this so that it’s also compatible with future releases of woocommerce? It might be that the function is removed on a bigger version bump since it’s deprecated.

    Thank you in advance!

    • This topic was modified 4 years, 1 month ago by jenochi.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter jenochi

    (@jenochi)

    Hello,

    Do you guys have any contribution program for the plugin?
    Because then I’d fix it myself and submit the PR for you.

    Any repsonse would be great!

    Thank you in advance!

    Wokkels

    (@wokkels)

    Ran into this error myself too, took some time to realise it came from sendcloud’s plugin.

    \plugins\sendcloud-shipping\includes\shipping\class-service-point-shipping-method.php
    Line 74: if ( ‘incl’ === WC()->cart->tax_display_cart ) {

    Got error ‘PHP message: The WC()->cart->tax_display_cart argument is deprecated since version 4.4. Use WC()->cart->get_tax_price_display_mode() instead.’,

    • This reply was modified 4 years ago by Wokkels.
    Plugin Author Sendcloud

    (@sendcloudbv)

    Hi,

    Thank you for your message.

    We received this question before. There is confirmed that this is not a sendcloud issue. But rather that the sendcloud plugin triggers the error. I would recommend you to:
    – Go through the code (probably /wp-includes/functions.php) and change the argument to the correct one that is not depricated anymore – the one that is mentioned in the error message
    – Set up WooCommerce shop from scratch so he can make sure to only use up to date plugins / themes

    Basically all you need to change is the depricated one to the correct one from: (“WC_Cart->tax_display_cart”) should be changed to (” WC_Cart->get_tax_price_display_mode()”) and then it should work. Can you please change this and let us know what the result is here?

    I hope this will solve your issue. If not please do not hesitate to contact us!

    Have a nice day!

    Kind regards,

    Loes
    Technical Support Specialist – Sendcloud B.V.

    • This reply was modified 4 years ago by Sendcloud.
    • This reply was modified 4 years ago by Sendcloud.
    Thread Starter jenochi

    (@jenochi)

    Hey Loes,

    Thanks for your help.
    This indeed worked out.

    But another question is, when will an update get released for this issue?
    It seems that you guys need to provide a fix for this issue so that future customers who download the plugin also get the proper fix included.

    Will this be released any time soon?

    I’m happy to help if needed.

    Thread Starter jenochi

    (@jenochi)

    Still not fixed by the way, and this is a sendcloud plugin issue.

    You guys are calling the function

    WC()->cart->tax_display_cart

    inside: \plugins\sendcloud-shipping\includes\shipping\class-service-point-shipping-method.php

    How is this not related to your plugin since it’s being raised by your plugin?

    This is taking ages simply to fix a small portion and make it compatible without raising notices all over the place.

    Besides as you guys noted it’s:
    “Basically all you need to change is the depricated one to the correct one from: (“WC_Cart->tax_display_cart”) should be changed to (” WC_Cart->get_tax_price_display_mode()”)”

    Thread Starter jenochi

    (@jenochi)

    Bump for version 2 being released and this notice still is in the code.

    Please fix.

    Its in wp-content/plugins/sendcloud-shipping/includes/Checkout/Shipping/class-abstract-free-shipping-shipping-method.php line 89 now

    It seems this line needs to be changed to:
    if ( 'incl' === WC()->cart->get_tax_price_display_mode() ) {

    • This reply was modified 3 years, 4 months ago by mhenze.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘tax_display_cart deprecated’ is closed to new replies.