PHP 8.2+ Compatibility

  • Removed deprecated utf8_encode() function – Replaced with proper character encoding handling using mb_convert_encoding() where necessary to prevent fatal errors on PHP 8.2+
  • Fixed “Creation of dynamic property” warnings – Properly declared $errors and $warnings properties in AmazonFeed class to comply with PHP 8.2 dynamic property deprecation
  • Fixed ValueError in str_getcsv() – Corrected the enclosure parameter to be a single character as required by PHP 8, preventing fatal errors when processing feed results (Ticket #69542)
  • Fixed count() type error – Added null value checks before passing values to count() function during product imports to prevent “Argument must be of type Countable|array” errors (Ticket #69615)

Bug Fixes

  • Fixed feed submission results not being stored – Feed submission results now consistently stored for all orders, ensuring the green confirmation checkmark appears correctly in the Orders page after successful Amazon order fulfillment feeds (Ticket #68473)
  • Fixed stock synchronization on cancelled orders – Now uses WooCommerce core wc_update_product_stock() function and properly saves the WC_Order after marking order_stock_reduced flag, preventing duplicate stock increases when orders are cancelled (Tickets #68591, #68797)
  • Fixed order item discount calculation – Corrected discount logic to subtract from line_total instead of adding to line_subtotal, preventing order total calculation errors
  • Fixed tax rate property warning – Resolved “Attempt to read property ‘tax_rate’ on null” warning by using $tax_rate_percent variable instead of attempting to access property on potentially null object

Improvements

  • Updated MSRP plugin detection – Updated detection method to work with recent changes in the MSRP pricing plugin, preventing duplicate MSRP price fields from appearing in product edit screens (Ticket #69108)

Technical Changes

  • Improved character encoding handling by removing unnecessary utf8_encode() calls and using mb_convert_encoding() where encoding conversion is actually needed
  • Enhanced error handling for null values in product import processes
  • Standardized use of WooCommerce core functions for stock management to improve compatibility with other plugins