Remove ‘Pre-order product’ cart label

[ad_1]

Hi there,

Is it possible to remove the ‘Pre-order product’ label that displays with the product in the cart?

Unfortunately it doesn’t display correctly with the CartPops mini cart, and I can’t find a way to hide it as it doesn’t have a class set.

I think it’s being called from class-yith-pre-order-frontend.php

/**
* Text that announces a product is a pre-order displayed in the Cart page.
*
* @param array $cart_item The cart item.
*/
public function pre_order_product_cart_label( $cart_item ) {
$product = $cart_item['data'];
if ( ! is_cart() || ! YITH_Pre_Order_Utils::is_pre_order_active( $product ) ) {
return;
}

$label = apply_filters( 'yith_ywpo_pre_order_product_label', __( 'Pre-order product', 'yith-pre-order-for-woocommerce' ), null, $product->get_id(), $cart_item );
$output = apply_filters( 'yith_ywpo_pre_order_product_label_output', '<div style="font-size: 10px;">' . $label . '</div>', null, $product->get_id(), $cart_item, $label );
echo wp_kses_post( $output );
}

Is there a way I can either stop the function from running, or add a style class so I can hide with css?

Thank you for your help!

  • This topic was modified 5 hours, 16 minutes ago by JapeNZ.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer