Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #15508

    Dear Abundance Support,

    On the checkout page is there a way that I can change the “Order Notes” title to my own title which I would ideally like to say “Delivery Date and Message”.

    Thanks,

    Minnoe

    #87781

    Try to add following code to functions.php (at the very bottom):

    // Hook in
    add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
    add_filter( 'woocommerce_billing_fields' , 'custom_override_billing_fields' );

    function custom_override_checkout_fields( $fields ) {
    $fields['order']['order_comments']['placeholder'] = 'My new placeholder';
    $fields['order']['order_comments']['label'] = 'My new label';
    return $fields;
    }

    // Our hooked in function - $fields is passed via the filter!
    function custom_override_billing_fields( $fields ) {
    $fields['order']['order_comments']['placeholder'] = 'My new placeholder';
    $fields['order']['order_comments']['label'] = 'My new label';
    return $fields;
    }

    and replace “My new placeholder” (without “”) and “My new label” (without “”) with your custom text/message.

    #87782

    Because you asked how to edit the template directly – you need to use a ftp software like filezilla. Connect to your server and navigate to wp-content/plugins/woocommerce/classes/class-wc-checkout.php and search for following code:

    $this->checkout_fields['order']	= array(
    'order_comments' => array(
    'type' => 'textarea',
    'class' => array('notes'),
    'label' => __('Order Notes', 'woocommerce'),
    'placeholder' => _x('Notes about your order, e.g. special notes for delivery.', 'placeholder', 'woocommerce')
    )
    );

    #87783

    Hi,

    I was about to answer this on another thread which is obviously the same here. Yes, that is correct, I think you are talking about the checkout page not the cart page.

    Please stick on your post. :)

    Cheers,

    Ismael

    #87784

    Thank you,

    Minnoe

    #87785

    Hi Minnoe,

    Glad that this is resolved. :)

    Cheers,

    Ismael

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Another Cart Question’ is closed to new replies.