woocommerce_order_item_visible

woocommerce_order_item_visible

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_order_item_visible') is found 6 times:

  • /includes/class-wc-structured-data.php line 604
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    );
     
    $markup_offers = array();
    foreach ( $order->get_items() as $item ) {
        if ( ! apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
            continue;
        }
     
        $product        = $item->get_product();
        $product_exists = is_object( $product );
        $is_visible     = $product_exists && $product->is_visible();
  • /src/Blocks/BlockTypes/OrderConfirmation/Totals.php line 106
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
        $order->get_items( apply_filters( 'woocommerce_purchase_order_item_types', 'line_item' ) ),
        function( $item ) {
            // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
            return apply_filters( 'woocommerce_order_item_visible', true, $item );
        }
    );
     
    foreach ( $order_items as $item_id => $item ) {
        $product = $item->get_product();
        $return .= $this->render_order_details_table_item( $order, $item_id, $item, $product );
  • /templates/checkout/form-pay.php line 36
    get_items() ) > 0 ) : ?>
    get_items() as $item_id => $item ) : ?>

  • /templates/emails/email-order-items.php line 33
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    $sku           = '';
    $purchase_note = '';
    $image         = '';
     
    if ( ! apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
        continue;
    }
     
    if ( is_object( $product ) ) {
        $sku           = $product->get_sku();
        $purchase_note = $product->get_purchase_note();
  • /templates/emails/plain/email-order-items.php line 27
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    $email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
     
    foreach ( $items as $item_id => $item ) :
        if ( apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
            $product       = $item->get_product();
            $sku           = '';
            $purchase_note = '';
     
            if ( is_object( $product ) ) {
                $sku           = $product->get_sku();
  • /templates/order/order-details-item.php line 22
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    if ( ! defined( 'ABSPATH' ) ) {
        exit;
    }
     
    if ( ! apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
        return;
    }
    ?>
    <tr class="<?php echo esc_attr( apply_filters( 'woocommerce_order_item_class', 'woocommerce-table__line-item order_item', $item, $order ) ); ?>">
     
        <td class="woocommerce-table__product-name product-name">