{"id":12681380,"date":"2020-04-16T03:57:40","date_gmt":"2020-04-16T03:57:40","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/missing-order-comments\/"},"modified":"2020-04-16T03:57:40","modified_gmt":"2020-04-16T03:57:40","slug":"missing-order-comments","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/missing-order-comments\/","title":{"rendered":"Missing Order Comments"},"content":{"rendered":"<p>Really need some help with this &#8211; I&#8217;m getting close to wrapping things up.<\/p>\n<p>There&#8217;s a gap in WooCommerce &#8211; if a customer clicks on Smart Payment PayPal button they will NOT see the checkout page that&#8217;s shown if they normally clicked on Checkout button. That means they can&#8217;t enter Order Comments\/Notes. So I need to add that field to the page that shows up after clicking on PaypPal Smart button which is form-checkout.php. How can I add Order Comments\/Notes there?<\/p>\n<p>I&#8217;ve tried a few things and it&#8217;s not working. <\/p>\n<p>Could someone past this from form-shipping.php into form-checkout.php? It shows the right text but it then doesn&#8217;t show up in the Orders page so it must not be the right field name.<\/p>\n<p>&lt;div class=&#8221;woocommerce-additional-fields&#8221;&gt;<br \/>\n\t&lt;?php do_action( &#8216;woocommerce_before_order_notes&#8217;, $checkout ); ?&gt;<br \/>\n\t&lt;?php if ( apply_filters( &#8216;woocommerce_enable_order_notes_field&#8217;, &#8216;yes&#8217; === get_option( &#8216;woocommerce_enable_order_comments&#8217;, &#8216;yes&#8217; ) ) ) : ?&gt;<br \/>\n\t\t&lt;?php if ( ! WC()-&gt;cart-&gt;needs_shipping() || wc_ship_to_billing_address_only() ) : ?&gt;<br \/>\n\t\t\t&lt;h3&gt;&lt;?php esc_html_e( &#8216;Additional information&#8217;, &#8216;woocommerce&#8217; ); ?&gt;&lt;\/h3&gt;<br \/>\n\t\t&lt;?php endif; ?&gt;<br \/>\n\t\t&lt;div class=&#8221;woocommerce-additional-fields__field-wrapper&#8221;&gt;<br \/>\n\t\t\t&lt;?php foreach ( $checkout-&gt;get_checkout_fields( &#8216;order&#8217; ) as $key =&gt; $field ) : ?&gt;<br \/>\n\t\t\t\t&lt;?php woocommerce_form_field( $key, $field, $checkout-&gt;get_value( $key ) ); ?&gt;<br \/>\n\t\t\t&lt;?php endforeach; ?&gt;<br \/>\n\t\t&lt;\/div&gt;<br \/>\n\t&lt;?php endif; ?&gt;<br \/>\n\t&lt;?php do_action( &#8216;woocommerce_after_order_notes&#8217;, $checkout ); ?&gt;<br \/>\n&lt;\/div&gt;<\/p>\n<p>Thanks!<\/p>\n","protected":false},"template":"","class_list":["post-12681380","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12681380","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12681380\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=12681380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}