Kolumna na liście zamówień w WooCommerce

/*uwagi do zamówienia na liście zamówień/
add_filter( 'manage_edit-shop_order_columns’, 'add_order_notes_column’ );
function add_order_notes_column( $columns ) {
$columns[’order_notes’] = __( 'Uwagi’, 'woocommerce’ );
return $columns;
}

add_action( 'manage_shop_order_posts_custom_column’, 'add_order_notes_column_content’ );
function add_order_notes_column_content( $column ) {
global $post;
if ( $column == 'order_notes’ ) {
$order = wc_get_order( $post->ID );
$notes = $order->get_customer_note();
echo wp_kses_post( nl2br( make_clickable( $notes ) ) );
}
}

Similar Posts