• Resolved ablears

    (@ablears)


    I am seeing error log entries about using a long-depreciated Woo function.

    PHP Deprecated: WC_Cart::get_cart_url is deprecated since version 2.5! Use wc_get_cart_url instead

    I found the function call in woocommerce-abandoned-cart/cron/wcal_send_email.php line 256.

    $cart_page_link = $woocommerce->cart->get_cart_url();

    I think it should be:

    $cart_page_link = $woocommerce->cart->wc_get_cart_url();

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support priyankajagtap

    (@priyankajagtap)

    Hi @ablears,

    Thank you for sharing the error log.

    Can you please let us know what version of WordPress, WooCommerce, and our Abandoned Cart Lite plugin you are using?

    Do let us know. Also, I will consult the development team regarding this error and will get back to you on the same.

    Regards,
    Priyanka Jagtap

    Plugin Support priyankajagtap

    (@priyankajagtap)

    Hi @ablears,

    It had a long time since you haven’t get back to us on this.

    We tried to replicate this issue at our end but we are unable to replicate the same.
    Currently, the code present at the mentioned line is as below, and we using the old code in the condition for the WooCommerce version below 2.3.

    if( $woocommerce->version < ‘2.3’ ) {
    $cart_page_link = $woocommerce->cart->get_cart_url();
    } else {
    $cart_page_id = wc_get_page_id( ‘cart’ );
    $cart_page_link = $cart_page_id ? get_permalink( $cart_page_id ) : ”;
    }

    Kindly check the same and let us know if you have any questions.

    Regards,
    Priyanka Jagtap

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

The topic ‘PHP Deprecated: WC_Cart::get_cart_url’ is closed to new replies.