Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Jeff Alvarez

    (@superlemon1998)

    Hi @bilievesser

    We’ve changed how our plugin works with hidden products, right now it will always be hidden. You can change this with the following snippet:

    add_filter( 'adt_product_feed_get_products_query_args', function( $query_args ) {
    // Remove the tax_query filter for 'exclude-from-catalog' or 'exclude-from-search'
    if ( isset( $query_args['tax_query'] ) && is_array( $query_args['tax_query'] ) ) {
    $query_args['tax_query'] = array_filter( $query_args['tax_query'], function( $tax ) {
    return ! (
    isset( $tax['taxonomy'], $tax['terms'] ) &&
    $tax['taxonomy'] === 'product_visibility' &&
    array_intersect( $tax['terms'], [ 'exclude-from-catalog', 'exclude-from-search' ] )
    );
    });
    }

    return $query_args;
    });
    • This reply was modified 1 year, 1 month ago by Jeff Alvarez.
    Thread Starter bilievesser

    (@bilievesser)

    Thank you! Works great 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Include hidden products?’ is closed to new replies.