Hi @davidmazza21,
Sorry, this issue is not related to our plugin. But we are sharing a reference link.
Please let us know if you need any other help related our plugin.
Regards,Moksha.
Thank you Moksha, could you provide the code to insert the last note of a command ?
Dear Moshka, I come back to you. Could you share a code in order to implement your solution.
Regards
Hi @davidmazza21,
Apologies for the delay in responding. We would like to share a link with you that will allow you to add the notes field as a column in the WooCommerce admin orders page.
Regards,Moksha.
Dear Moshka, Thank you for this helping link that I have follwed instructions.
On the 3rd step :
https://snipboard.io/7TgJyB.jpg
What info I have to edit in order to store in column 1 the last not of the commande :
https://snipboard.io/xoILdv.jpg
And same for column2 for the before last note. ?
Best regards
Hi @davidmazza21,
For adding the notes field as a column in the WooCommerce admin orders pages. Please add this function as a snippet using the Code Snippets plugin.
function ac_column_value_usage( $value, $id, AC\Column $column ) {
if( $column instanceof \ACA\WC\Column\ShopOrder\Notes ){
$notes = wc_get_order_notes( [ 'order_id' => $id ] );
$content = [];
foreach ( $notes as $note ) {
$note_content = sprintf( '<small><strong>%s</strong><br>%s</small>', $note->date_created->format( 'F j, Y - H:i' ), $note->content );
$content[] = $note_content;
}
$value = implode( $content );
}
return $value;
}
add_filter( 'ac/column/value', 'ac_column_value_usage', 10, 3 );
Please inform us if everything is running smoothly or if you are encountering any issues. Also, feel free to let me know if there is anything else I can do to assist you.
Regards,Moksha.