Remove item in Checkout
Question
I am using this code for remove items in Checkout
add_filter(‘woocommerce_cart_item_name’, ‘custom_filter_wc_cart_item_remove_link’, 10, 3);
function custom_filter_wc_cart_item_remove_link($product_name, $cart_item, $cart_item_key)
{
if (is_checkout()) {
$product_name .= apply_filters('woocommerce_cart_item_remove_link', sprintf(
'<a href="%s" rel="nofollow" class="remove" style="float:left;">×</a>',
esc_url(WC_Cart::get_remove_url($cart_item_key)),
__('Remove this item', 'woocommerce'),
esc_attr($cart_item['product_id']),
esc_attr($cart_item['data']->get_sku())
), $cart_item_key);
return $product_name;
}
}
But it has an error because this line is old code
esc_url(WC_Cart::get_remove_url
Do you know how fix it
0
2 months
0 Answers
9 views
0
Leave an answer
You must login or register to add a new answer .