floyd0987
Forum Replies Created
-
PHP Version 7.4.32
Thank you!
this is the fix.
A version check and a direct call to wc_get_formatted_cart_item_data.
I had tried to substitute get_item_data with wc_get_formatted_cart_item_data as
WC()->cart->wc_get_formatted_cart_item_data and didn’t work. Obviously!
Ok, this seems to solve it at last. Frankly it didn’t cause any trouble on the front-end but those error logs looked nasty and had to debug a payment gateway callback issue and these errors had to be removed.
Perhaps you should add a batch upgrade to 1.0.3.xoo-wsc-content.php
// Meta data
if(version_compare( WC()->version , ‘3.3.0’ , “<” )){
$attributes .= WC()->cart->get_item_data( $cart_item );
}
else{
$attributes .= wc_get_formatted_cart_item_data( $cart_item );
}- This reply was modified 5 years, 11 months ago by floyd0987.
I’m also getting this very annoying error, please fix it!
[Mon Dec 10 21:13:44.156582 2018] [proxy_fcgi:error] [pid 30344:tid 139935570900736] [client 151.67.41.170:52068] AH01071: Got error ‘PHP message: The WC_Cart::get_item_data function is deprecated since version 3.3. Replace with wc_get_formatted_cart_item_data.\nPHP message: The WC_Cart::get_item_data function is deprecated since version 3.3. Replace with wc_get_formatted_cart_item_data.\nPHP message: The WC_Cart::get_item_data function is deprecated since version 3.3. Replace with wc_get_formatted_cart_item_data.\nPHP message: The WC_Cart::get_item_data function is deprecated since version 3.3. Replace with wc_get_formatted_cart_item_data.\nPHP message: The WC_Cart::get_item_data function is deprecated since version 3.3. Replace with wc_get_formatted_cart_item_data.\nPHP message: The WC_Cart::get_item_data function is deprecated since version 3.3. Replace with wc_get_formatted_cart_item_data.\n’