• Resolved nartoof

    (@nartoof)


    Hi,

    I got an issue with the gift card meta data after the order is completed, I got two amount meta data.

    The issue is only after order completed (thank you page, Emails, edit-order in back-office).

    I got no problem in the cart and checkout review order.

    Here is a quick screen of my TY page and a customer Email : Screen

    The first line have a missing translation, and the second line miss a wc_price().

    I didn’t check your code, I only tried to deactivate plugins and switch to twentytwenty but the issue is still there…

    Do you have any idea how to fix it ?

    Thank you very much.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author pimwick

    (@pimwick)

    It looks like the “Amount” attribute is displaying twice but I can’t figure out where the second amount is coming from.

    The PW Gift Card plugin doesn’t put currency formatting on the amount field. Based on your screenshot, “Montant: 10” is what is coming from out plugin. “Montant: 10.00€” isn’t from our plugin. In the second screenshot, it show sup as “Gift Card Amount: 10.00€”

    If you email [email protected] with the URL to your store I will look at the HTML to see if I might be able to tell where this field is coming from.

    Plugin Author pimwick

    (@pimwick)

    I’m marking this thread as resolved but let us know if you have further questions.

    Thread Starter nartoof

    (@nartoof)

    I’m really sorry to answer that late.
    Got a lot to do on this website.

    I get back to this point on my to do list.

    I can email you the URL but the website is under construction and protected…
    Here is a screen to the HTML : Screen

    I’m on V 1.151 right now and the problem is still there.

    If I get the order item meta with this code below :

    foreach ( $order->get_items() as $item_id => $item ) {
    	   $allmeta = $item->get_meta_data();
    
    	   foreach ($allmeta as $key => $meta )
    	   {
    		   echo $key . ' : ';
                       print_r($meta); 
                       echo  '<br />';
    	   }
    }

    I got this result :

    0 : WC_Meta_Data Object ( [current_data:protected] => Array ( [id] => 2714 [key] => gift-card-amount [value] => 10.00€ ) [data:protected] => Array ( [id] => 2714 [key] => gift-card-amount [value] => 10.00€ ) )
    1 : WC_Meta_Data Object ( [current_data:protected] => Array ( [id] => 2715 [key] => pw_gift_card_amount [value] => 10 ) [data:protected] => Array ( [id] => 2715 [key] => pw_gift_card_amount [value] => 10 ) )

    Now we need to find where the gift-card-amount meta is set because it looks like it is this one who isn’t coming from your plugin…

    If you have any idea… Thank you ??

    Thread Starter nartoof

    (@nartoof)

    I can now say it comes from another plugin, I need to find where and why ??

    I can confirm it’s not an issue with your plugin !

    Thanks ??

    Thread Starter nartoof

    (@nartoof)

    Just if it happens to someone else.

    It this case, it was the product variation displayed as order meta because of this filter :

    add_filter( 'woocommerce_product_variation_title_include_attributes', '__return_false' );

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Gift card amount appears twice in order’ is closed to new replies.