WC_Admin_Taxonomies::product_cat_notes() public WC 1.0
Add some notes to describe the behavior of the default category.
{} Это метод класса: WC_Admin_Taxonomies{}
Хуков нет.
Возвращает
Null. Ничего.
Использование
$WC_Admin_Taxonomies = new WC_Admin_Taxonomies(); $WC_Admin_Taxonomies->product_cat_notes();
Код WC_Admin_Taxonomies::product_cat_notes() WC Admin Taxonomies::product cat notes WC 5.0.0
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
}