• Hey guys,

    I have PHP v8.2.4

    I am ading custom code suign ‘woocommerce_applied_coupon’ this hook but i am gettting this error msg.

    Here I am doing this: Increasing product quantity after the coupon code is applying

    Deprecated: Creating a dynamic property WC_Coupon::$sort is deprecated in /var/www/vhosts/example.com/httpdocs/wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php on line 375

    Any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hi there @sunshinesai,

    Thanks for reaching out.

    It appears that you’re encountering a deprecation notice. This is because the WC_Coupon::$sort property you’re trying to use has been deprecated in the version of WooCommerce you’re using.

    I would recommend reviewing your custom code and replace any deprecated properties or methods.

    However, here are a few suggestions as helping out with custom coding of this nature is outside the scope of support:

    1. Running the exact code through an AI platform like ChatGPT for recommendations/changes to your code.
    2. Joining our WooCommerce Slack community (it does have a developer channel where you can ask coding questions): https://woo.com/community-slack/.

    I hope this helps.

    Plugin Author Barry

    (@barryhughes-1)

    Hi @sunshinesai,

    This problem should be fixed as of our upcoming 8.7.0 release, which is scheduled for March 12 🙂

    https://github.com/woocommerce/woocommerce/pull/40998

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.