• Resolved prodograw

    (@prodograw)


    how do i go about including system notes in the order notes ?

    seems they are ignored I do specifically need them at present

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author algol.plus

    (@algolplus)

    please, open “Misc Settings” and mark checkbox “Export all order notes”

    Thread Starter prodograw

    (@prodograw)

    sorry i have found the answer

    created a custom meta key and used below

    add_filter('woe_get_order_value_system_notes',function ($value, $order,$fieldname) {
      remove_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' ) );
          $args  = array(
          'post_id' => $order->get_id(),
          'approve' => 'approve',
          'type'    => 'order_note',
          'orderby' => 'comment_ID',
          'order'   => 'ASC',
          );
          $notes = get_comments( $args );
          
          $lines = array();
          foreach($notes as $note) {
                  if (strpos($note->comment_content,'Packed By') !== false) {
                      $lines[] = $note->comment_content;
                  }
          }
          return join("n",$lines);
      },10,3);
    • This reply was modified 6 years, 1 month ago by prodograw.
    Plugin Author algol.plus

    (@algolplus)

    ooo
    🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Include System Note In Order Notes’ is closed to new replies.