• Resolved fcujorick2

    (@fcujorick2)


    Hi guys,

    I would like some help with the following errors which slowing down my webshop alot..

    [16-Jul-2023 12:36:52 UTC] The woocommerce_price function is deprecated since version 3.0. Replace with wc_price.
    [16-Jul-2023 12:36:52 UTC] price was called incorrectly. Producteigenschappen mogen niet rechtstreeks aangeroepen worden. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_nm_suggestions_product_data’), WP_Hook->do_action, WP_Hook->apply_filters, NM_Search_Suggestions->instant_suggestions_get_product_data, WC_Product_Variable->get_price_html, apply_filters(‘woocommerce_variable_price_html’), WP_Hook->apply_filters, wphelpdesk_variate_prijs_verschil, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong. This message was added in version 3.0.


    I found this in the /wc-deprecated-functions.php

    • @deprecated 3.0
      */
      function woocommerce_price( $price, $args = array() ) {
      wc_deprecated_function( FUNCTION, ‘3.0’, ‘wc_price’ );
      return wc_price( $price, $args );
      }

    Any one can help me to solve these two?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter fcujorick2

    (@fcujorick2)

    Site is http://www.kunstinkaart.nl

    • This reply was modified 2 years, 10 months ago by fcujorick2.

    Hi @fcujorick2 ,

    Thanks for reaching out!

    The error messages you provided are related to deprecated functions in WooCommerce. Deprecated functions are functions that have been replaced with newer ones and are no longer recommended for use.

    The errors are informing you that certain parts of your code are using deprecated functions, which can lead to compatibility issues and potentially slow down your site.

    Its possible that the deprecated function is being called by another plugin, theme or custom code, however, before suggesting a full conflict test, I’d like to have a better understanding of your sites current environment so that we can see if there is anything there that may help us identify what may be triggering these notices.

    Please can you share a copy of your sites System Status Report which you can find via WooCommerce → Status. Select Get system report and then Copy for support. Once you have this, please share the results with us here.

    Cheers!

    Thread Starter fcujorick2

    (@fcujorick2)

    Thank you,

    It was a old code in our functions.php, we’ve changed that with a newer one and now it appears to be fixed

    Hi @fcujorick2 ,

    I’m really glad to hear that you managed to identify the culprit!

    I will go ahead and mark this as resolved then, feel free to create a new topic if you need any further help.

    Also, if you have a minute, we’d love it if you would leave us a review:

    https://ww.wp.xz.cn/support/plugin/woocommerce/reviews/

    Cheers!

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

The topic ‘price called incorrectly’ is closed to new replies.