Support » Plugin: Advanced Order Export For WooCommerce » Customer Notes in WC 3.0+

  • Resolved miikewordpress

    (@miikewordpress)


    Hello,

    I updated WC from 2.6 to 3.2.6 lately and found that there is some change in customer/order notes. The new WC does not have separate space for customer note and I have to select between private/customer note to add a manual note.

    Now Customer Note field has nothing inside even though I added some customer note.
    And the Order Notes field looks like this now

    Processing order email notification manually sent.
    Order status changed from On hold to Processing.
    Manual Private/Customer Note Example
    Order status changed from Processing to On hold.
    Processing order email notification manually sent.
    Order status changed from On hold to Processing.
    Order status changed from Processing to On hold.

    So in each Order Note cell, there are 3-7 lines inside a cell with most of system’s automatic messages that we don’t need.
    I don’t know why it is changed this way and I know it’s not your plugins fault but would there be any way to export only the Private Note that we manually added?

    Thank you very much for your great plugin!

    Mike

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

    (@algolplus)

    hi Mike

    “customer provided note” is separate field in section “Shipping”.

    Could you check section “Misc settings” ?
    is “Export all order notes” off?

    thanks, Alex

    Plugin Author algol.plus

    (@algolplus)

    Try this code to export only “note to customer”

    add_filter("woe_get_order_notes", function($comment, $note, $order) {
      $customer_note = (bool) get_comment_meta( $note->comment_ID, 'is_customer_note', true );
      if(!$customer_note)
        $comment = "";
      return $comment;
    },10,3);

    Thanks Alex for your super quick reply!

    I have enabled both Order Notes and Customer Notes.

    “Export all order notes” was off and I tried enabling it. I will explain my results.

    If “Export all order notes” is OFF, Order Note field is like below,

    Order status changed from Completed to Cancelled.
    Order status changed from Processing to Completed.
    Order status changed from Cancelled to Processing.
    Manual Note
    Order status changed from Completed to Cancelled.
    Order status changed from Cancelled to Completed.
    Order status changed from On hold to Cancelled.

    If “Export all order notes” is ON, Order Note field is like below,

    Order status changed from Completed to Cancelled.
    Order status changed from Processing to Completed.
    Order status changed from Cancelled to Processing.
    Manual Note
    Order status changed from Completed to Cancelled.
    Order status changed from Cancelled to Completed.
    Order status changed from On hold to Cancelled.
    Awaiting BACS payment Order status changed from Pending payment to On hold.
    Teleno (MS0349) stock reduced from 544 to 543.

    Customer Note field is empty in both cases.

    Thank you,

    Wow, I was writing a reply but you already sent me the code!

    Your code did work except that the $comment = ""; has left several line breaks in the cell. But it’s still workable on Excel so it’s a lot better. Thank you very much.

    May I ask you one thing if you don’t mind.

    This works when we added Customer Note. But what if we would like to export only Private Note? Because our note isn’t really necessary for customers.
    I don’t think is_private_note actually exists?

    Thank you very much!

    Plugin Author algol.plus

    (@algolplus)

    hi Mike

    “Customer Note” – Customer fills this field during checkout.

    Please, check my previous reply and use code to export only “notes to customer”.
    You can put it to “Custom PHP code” in section “Misc Settings”.
    thanks, Alex

    Okay I understood!

    Thank you very much Alex!

    Plugin Author algol.plus

    (@algolplus)

    “Order status changed from Completed to Cancelled.”
    Did you change statuses manually?
    The plugin shouldn’t export these lines if “Export all order notes” is OFF.

    for private notes modify lines to

      if($customer_note)
        $comment = "";
    • This reply was modified 1 year, 9 months ago by algol.plus.

    Okay I think now I understood how it works.

    “Order status changed from Completed to Cancelled.”
    this was actually done manually by admin.
    And it seems like WC is treating this same as manually added Private Note
    so the plugin exported those lines.

    Thank you very much Alex!

    Plugin Author algol.plus

    (@algolplus)

    yes, WC makes no difference between private notes and manual actions.

    you’re welcome .

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Customer Notes in WC 3.0+’ is closed to new replies.