• Resolved wpallthetime

    (@wpallthetime)


    Really need some help with this – I’m getting close to wrapping things up.

    There’s a gap in WooCommerce – if a customer clicks on Smart Payment PayPal button they will NOT see the checkout page that’s shown if they normally clicked on Checkout button. That means they can’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?

    I’ve tried a few things and it’s not working.

    Could someone past this from form-shipping.php into form-checkout.php? It shows the right text but it then doesn’t show up in the Orders page so it must not be the right field name.

    <div class=”woocommerce-additional-fields”>
    <?php do_action( ‘woocommerce_before_order_notes’, $checkout ); ?>
    <?php if ( apply_filters( ‘woocommerce_enable_order_notes_field’, ‘yes’ === get_option( ‘woocommerce_enable_order_comments’, ‘yes’ ) ) ) : ?>
    <?php if ( ! WC()->cart->needs_shipping() || wc_ship_to_billing_address_only() ) : ?>
    <h3><?php esc_html_e( ‘Additional information’, ‘woocommerce’ ); ?></h3>
    <?php endif; ?>
    <div class=”woocommerce-additional-fields__field-wrapper”>
    <?php foreach ( $checkout->get_checkout_fields( ‘order’ ) as $key => $field ) : ?>
    <?php woocommerce_form_field( $key, $field, $checkout->get_value( $key ) ); ?>
    <?php endforeach; ?>
    </div>
    <?php endif; ?>
    <?php do_action( ‘woocommerce_after_order_notes’, $checkout ); ?>
    </div>

    Thanks!

Viewing 1 replies (of 1 total)
  • Thread Starter wpallthetime

    (@wpallthetime)

    To add to this, with the above change I can still see it on the initial checkout page if I follow that flow. But if I move it from form-shipping then it isn’t saving.

    What in form-shipping is making WooCommerce know to save the text as the right field. It must not be saving it to the database.

Viewing 1 replies (of 1 total)
  • The topic ‘Missing Order Comments’ is closed to new replies.