• Resolved misstest

    (@misstest)


    I added a product that cost $545 and it says that the total ammount is $ 36545.
    Why and how can i fix this?

    Example:

    *Product 130 ml*
    *Quantity:* 1
    *Price:* $ 545

    *Total:* $ 36545

    Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Walter Pinem

    (@walterpinem)

    Hello there.

    Thanks for using this plugin.

    Have you tried the latest update?
    It should fix this issue already.

    Thanks in advance and waiting for your reply.

    leonardofreitas7

    (@leonardofreitas7)

    Same problem here.
    Plugin on v0.1.5 and have trouble.
    Can you help?

    atempel

    (@atempel)

    @walterpinem I was having the same problem and started looking your code, and in “wa-button.php” around line 508 there is:
    $total_amount = floatval( preg_replace( '#[^\d.]#', '', WC()->cart->get_cart_total() ) );

    On the preg_replace you used get_cart_total, I just tested using cart_contents_total instead and it worked perfectly.

    The final line of code becomes this:
    $total_amount = floatval( preg_replace( '#[^\d.]#', '', WC()->cart->cart_contents_total ) );

    Also, thanks a lot for the plugin <3 really well done and awesomely handy!

    • This reply was modified 6 years ago by atempel. Reason: adding information
    • This reply was modified 6 years ago by atempel.
    Plugin Author Walter Pinem

    (@walterpinem)

    Hello.

    Thanks for reporting this issue guys @leonardofreitas7 @atempel
    Also thanks very much for the input @atempel

    Please be patient with me for the next update.

    Thanks in advance.

    Thread Starter misstest

    (@misstest)

    Thank you for the update! Is fixed

    Plugin Author Walter Pinem

    (@walterpinem)

    @misstest Thank you for your confirmation.
    Glad it now works for you 🙂

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

The topic ‘Total ammount is wrong’ is closed to new replies.