Checking If sizeof($addons>0)

Checking  sizeof($addons>0) along with !empty($search) to display search results if addons found
This commit is contained in:
Sandeep Rajakrishnan 2021-09-07 19:53:11 +05:30 committed by GitHub
parent 432f7caf0d
commit 89c9dadd9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ $current_section_name = __( 'Browse Categories', 'woocommerce' );
<?php esc_html_e( 'Sorry, could not find anything. Try searching again using a different term.', 'woocommerce' ); ?></p>
</h1>
<?php endif; ?>
<?php if ( ! empty( $search ) ) : ?>
<?php if ( ! empty( $search ) && sizeof($addons)>0 ) : ?>
<h1 class="search-form-title">
<?php // translators: search keyword. ?>
<?php printf( esc_html__( 'Search results for "%s"', 'woocommerce' ), esc_html( sanitize_text_field( wp_unslash( $search ) ) ) ); ?>