From 5b786261e1454e16fd2deb3acb3826750506e613 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 11 Aug 2015 12:09:54 +0100 Subject: [PATCH] Hide get_formatted_legacy notices when doing ajax. --- includes/class-wc-order-item-meta.php | 4 +++- readme.txt | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/class-wc-order-item-meta.php b/includes/class-wc-order-item-meta.php index c15308f6888..417be789190 100644 --- a/includes/class-wc-order-item-meta.php +++ b/includes/class-wc-order-item-meta.php @@ -140,7 +140,9 @@ class WC_Order_Item_Meta { * @return array */ public function get_formatted_legacy( $hideprefix = '_' ) { - _deprecated_function( 'get_formatted_legacy', '2.4', 'Item Meta Data is being called with legacy arguments' ); + if ( ! is_ajax() ) { + _deprecated_function( 'get_formatted_legacy', '2.4', 'Item Meta Data is being called with legacy arguments' ); + } $formatted_meta = array(); diff --git a/readme.txt b/readme.txt index e87bd2ec845..a06c42c47d2 100644 --- a/readme.txt +++ b/readme.txt @@ -166,6 +166,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc * Tweak - Made tab panel selector more specific to avoid theme conflicts. * Tweak - Made checkout make use of new ajax endpoints. * Tweak - woocommerce_force_ssl_checkout no longer needs to check for admin-ajax actions. +* Tweak - Hide get_formatted_legacy notices when doing ajax. = 2.4.1 - 10/08/2015 = * Fix - Tweaked the 2.4 upgrade routine to disable refund emails during update.