Merge pull request #30641 from san-coding/trunk

Added text to be displayed when invalid data is entered into search input field and  no search results are found
This commit is contained in:
Vedanshu Jain 2021-10-13 17:13:11 +05:30 committed by GitHub
commit c710cb8697
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -62,7 +62,12 @@ $current_section_name = __( 'Browse Categories', 'woocommerce' );
<div class="wrap"> <div class="wrap">
<div class="marketplace-content-wrapper"> <div class="marketplace-content-wrapper">
<?php if ( ! empty( $search ) ) : ?> <?php if ( count( $addons ) == 0 ) : ?>
<h1 class="search-form-title">
<?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 ) && count( $addons ) > 0 ) : ?>
<h1 class="search-form-title"> <h1 class="search-form-title">
<?php // translators: search keyword. ?> <?php // translators: search keyword. ?>
<?php printf( esc_html__( 'Search results for "%s"', 'woocommerce' ), esc_html( sanitize_text_field( wp_unslash( $search ) ) ) ); ?> <?php printf( esc_html__( 'Search results for "%s"', 'woocommerce' ), esc_html( sanitize_text_field( wp_unslash( $search ) ) ) ); ?>