• Resolved JapeNZ

    (@japenz)


    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 months, 2 weeks ago by JapeNZ.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.