WC_Admin_Taxonomies::product_cat_notes()

Add some notes to describe the behavior of the default category.


Description Description


Source Source

File: includes/admin/class-wc-admin-taxonomies.php

339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
public function product_cat_notes() {
    $category_id   = get_option( 'default_product_cat', 0 );
    $category      = get_term( $category_id, 'product_cat' );
    $category_name = ( ! $category || is_wp_error( $category ) ) ? _x( 'Uncategorized', 'Default category slug', 'woocommerce' ) : $category->name;
    ?>
    <div class="form-wrap edit-term-notes">
        <p>
            <strong><?php esc_html_e( 'Note:', 'woocommerce' ); ?></strong><br>
            <?php
                printf(
                    /* translators: %s: default category */
                    esc_html__( 'Deleting a category does not delete the products in that category. Instead, products that were only assigned to the deleted category are set to the category %s.', 'woocommerce' ),
                    '<strong>' . esc_html( $category_name ) . '</strong>'
                );
            ?>
        </p>
    </div>
    <?php
}

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.