Support » Plugin: WooCommerce » Incorrect formatting on gift card messages

  • Resolved obblehosting

    (@obblehosting)


    Hi, my client has an online florst and when customers put in a custom gift card message, sometimes their messages will replace spaces and some symbols with letters. Specifically ‘n’ or ‘nn’. Sometimes it will replace spaces or symbols with ‘u2661’ for example.

    very strange. Doesn’t do it to every order, nor to every symbol or space. Any idea why this may be occurring?

    p.s. I’ve only taken over on assisting this client. She had a previous developer who created the site & worked on the store.
    Thanks in advance.

Viewing 9 replies - 1 through 9 (of 9 total)
  • obblehosting

    (@obblehosting)

    Example:

    Happy Mothers Day for yesterday!nnHope you had a wonderful
    special Mother’s Day hug!nnLove and miss you lotsnnAri xx

    Note the ‘nn’s

    Stef

    (@serafinnyc)

    There’s not enough information to go on. Sounds like she’s using a Gift Card plugin. Best to list that plugin and a URL so we can assist better. Most likely you will have to contact the author of the plugin if it turns out she is in fact using a plugin.

    obblehosting

    (@obblehosting)

    Thanks Stef, I’ll take a look.

    obblehosting

    (@obblehosting)

    Seems to be using a custom plugin from old developer.

    add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields_yappy',100 );
    
    function yappy_display_admin_order_meta($order){
        echo '<p><strong>'.__('Phone').':</strong> ' . get_post_meta( $order->id, '_shipping_phone', true ) . '</p>';
        echo '<p><strong>'.__('Gift Card Message').':</strong> ' . get_post_meta( $order->id, '_billing_gift_card_message', true ) . '</p>';
    }
    
    add_action( 'woocommerce_admin_order_data_after_shipping_address', 'yappy_display_admin_order_meta', 10, 1 );
    

    And here is the field code:

    
            $fields['billing']['billing_gift_card_message'] =  array(
             'label'     => __('Gift Card Message', 'woocommerce'),
             'placeholder'   => _x('Message attached to Flowers', 'placeholder', 'woocommerce'),
             'required'  => false,
             'class'     => array('form-row','notes'),
             'clear'     => true,
             'type'      => 'textarea'
         );

    Could the way the data is saved affect this, do you think?

    After looking at the error codes it seems ‘nn’ replaces line break (return) and the u2661 is a unicode for a heart. Any chance I can edit this to allow these characters to be read?

    obblehosting

    (@obblehosting)

    Bump. Still need help with this if anyone knows or has ideas.

    Stef

    (@serafinnyc)

    Sorry, I thought by reading your response that you had solved this. That plugin isn’t supported here and I’m not familiar enough with it.

    Plugin Support dougaitken

    (@dougaitken)

    Automattic Happiness Engineer

    Hey @obblehosting

    I’m afraid this wouldn’t be something we can offer support with as it indeed isn’t part of the core WooCommerce plugin.

    If you are needing help with customizations or troubleshooting WooCommerce and do not have a developer or company you can depend on, then we’ve got recommendations for you.

    Visit https://woocommerce.com/customizations/ to find the right agency or developer for your specific needs.

    As your query is related to something outside of the WooCommerce plugin, I’m going to mark this as resolved.

    If you have any further questions about WooCommerce core, you can start a new thread.

    Thanks,

    Stef

    (@serafinnyc)

    You said CAN @dougaitken oops

    Plugin Support dougaitken

    (@dougaitken)

    Automattic Happiness Engineer

    You said CAN @dougaitken oops

    But I also started with “this wouldn’t be…” 🙂

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.