Change method name
This commit is contained in:
parent
145d47c580
commit
588c5f3779
|
@ -819,9 +819,9 @@ class WC_Cart extends WC_Legacy_Cart {
|
|||
* @return string
|
||||
*/
|
||||
public function get_item_data( $cart_item, $flat = false ) {
|
||||
wc_deprecated_function( 'WC_Cart::get_item_data', '3.3', 'wc_get_cart_item_data' );
|
||||
wc_deprecated_function( 'WC_Cart::get_item_data', '3.3', 'wc_get_formatted_cart_item_data' );
|
||||
|
||||
return wc_get_cart_item_data( $cart_item, $flat );
|
||||
return wc_get_formatted_cart_item_data( $cart_item, $flat );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2703,7 +2703,7 @@ function wc_get_theme_slug_for_templates() {
|
|||
* @param bool $flat Should the data be returned flat or in a list.
|
||||
* @return string
|
||||
*/
|
||||
function wc_get_cart_item_data( $cart_item, $flat = false ) {
|
||||
function wc_get_formatted_cart_item_data( $cart_item, $flat = false ) {
|
||||
$item_data = array();
|
||||
|
||||
// Variation values are shown only if they are not found in the title as of 3.0.
|
||||
|
|
|
@ -82,7 +82,7 @@ do_action( 'woocommerce_before_cart' ); ?>
|
|||
}
|
||||
|
||||
// Meta data.
|
||||
echo wc_get_cart_item_data( $cart_item );
|
||||
echo wc_get_formatted_cart_item_data( $cart_item );
|
||||
|
||||
// Backorder notification.
|
||||
if ( $_product->backorders_require_notification() && $_product->is_on_backorder( $cart_item['quantity'] ) ) {
|
||||
|
|
|
@ -57,7 +57,7 @@ do_action( 'woocommerce_before_mini_cart' ); ?>
|
|||
<?php echo str_replace( array( 'http:', 'https:' ), '', $thumbnail ) . $product_name . ' '; ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php echo wc_get_cart_item_data( $cart_item ); ?>
|
||||
<?php echo wc_get_formatted_cart_item_data( $cart_item ); ?>
|
||||
|
||||
<?php echo apply_filters( 'woocommerce_widget_cart_item_quantity', '<span class="quantity">' . sprintf( '%s × %s', $cart_item['quantity'], $product_price ) . '</span>', $cart_item, $cart_item_key ); ?>
|
||||
</li>
|
||||
|
|
|
@ -40,7 +40,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<td class="product-name">
|
||||
<?php echo apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ) . ' '; ?>
|
||||
<?php echo apply_filters( 'woocommerce_checkout_cart_item_quantity', ' <strong class="product-quantity">' . sprintf( '× %s', $cart_item['quantity'] ) . '</strong>', $cart_item, $cart_item_key ); ?>
|
||||
<?php echo wc_get_cart_item_data( $cart_item ); ?>
|
||||
<?php echo wc_get_formatted_cart_item_data( $cart_item ); ?>
|
||||
</td>
|
||||
<td class="product-total">
|
||||
<?php echo apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); ?>
|
||||
|
|
Loading…
Reference in New Issue