• Resolved Damir Tahiri

    (@tahireu)


    Hi,

    How can I make the order note visible in the admin (new order) email notification?

    Currently, I get this: “Note:There is no excerpt because this is a protected post.”

    I’ve tried to do a test on my other WordPress website with WooCommerce, but it’s the same there. only message is a bit different: “Note: Protected: Order – March 6, 2021 @ 07:10 AM”

    Same thing when I go to WP Admin -> WooCommerce -> Orders -> specific order. I also don’t see the order note there. Instead of it, I see these “protected” messages.

    How can I make order notes visible in admin emails and in the backend?

    Thank you,
    Damir

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    Hey there,

    It sounds like there might be something interesting happening with user roles and/or product permissions on your site.

    I’d start by checking the settings of the products in the order. For example, here’s what I’d expect it to look like:

    Product settings
    Link to image: https://d.pr/i/XbpsyY

    If they look different on your site, change them and try to make a test order – then see if the note shows up in the email.

    If that doesn’t work, could you please share a screenshot of one of the orders? Please do make sure to hide any personal information from the customer such as name, address, etc.

    Thread Starter Damir Tahiri

    (@tahireu)

    Hi Hannah,

    You can see the order example at this link:
    https://ibb.co/M2Qpz3s

    All products I use for tests are public.

    I’ve tried to do the test with all plugins deactivated, but the the problem remains. (I actually left some necessary plugins such as ACF Pro, WP SMTP, Multi-step checkout)

    Edit:
    Here is the this of active plugins:
    https://ibb.co/hmQ22N8

    Regards,
    Damir

    • This reply was modified 3 years, 8 months ago by Damir Tahiri.
    Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    Hey there,

    Thanks for sharing that screenshot!

    I haven’t ever seen this behavior before. I checked into the WooCommerce code, but this string doesn’t show up:
    https://github.com/woocommerce/woocommerce/search?q=there+is+no+excerpt+because+this+is+a+protected+post

    This kind of problem is usually caused by a conflict with your theme or with another plugin, but you mentioned that you’ve already disabled most plugins. Because this string doesn’t show up in WooCommerce’s code, it must be coming from another plugin. If certain plugins are required on your live site, then I’d recommend testing on a staging site.

    Here’s the best way to test:

    • Temporarily switch your theme to Storefront
    • Disable all plugins except for WooCommerce
    • Repeat the action that is causing the problem

    If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.`

    I hope that helps you in the right direction!

    Thread Starter Damir Tahiri

    (@tahireu)

    Hello Hannah,

    I have tested everything the way you have explained, and it seems that the plugins are not causing the problem.

    I have also noticed that in the wp-includes folder has a file post-template.php. Somewhere around the line 416 I found the following:

    	if ( post_password_required( $post ) ) {
    		return __( 'There is no excerpt because this is a protected post.' );
    	}

    Could you point me in the right direction to what I should try out next?

    Thank you,
    Damir

    Thread Starter Damir Tahiri

    (@tahireu)

    Hi Hannah,

    Seems like the problem is in our custom theme, because we get the notes with Storefront theme

    How can we enable this feature in our custom coded theme?

    Is there maybe some theme support that we forgot to enable?

    Thank you,
    Damir

    Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    Hey there!

    I’m glad you tracked it down! You’ll want to reach out to your theme’s developer for help on updating the theme to work with the order notes.

    Thread Starter Damir Tahiri

    (@tahireu)

    Ok, thank you Hannah.

    Regards,
    Damir

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Order note in admin email notification is “protected”’ is closed to new replies.