Wrong prices showing in order details

[ad_1]

Hi Zubair,

The prices change from 14.99 $ to 11.99 $ every time. The same happens in other currencies. The products at 14.99 $ are 102,44 DKK and those change to 81,95 DKK. At first I thought it might be removing the VAT from the prices somehow, but the percentages don’t match the prices.

The wrong price happens when I manually create an order inside WooCommerce>Orders too (see screenshot). Selecting different billing/shipping country doesn’t change anything either.

I enabled cash on delivery and created an order. The total ended up being correct, but it shows cost and the total price without tax and then the correct tax (see screenshot). The total price should be WITH the tax, right?

The products in the screenshot are supposed to be 90,82 kr. and 97,31 kr. for the bottom two. So with the cost and VAT, it does make the right price, it just doesn’t show it.

Here’s what I have in the Snippets plugin. I’ll add the code used below the screenshot:

// Add “Add to Cart” buttons in Divi shop pages
add_action( ‘woocommerce_after_shop_loop_item’, ‘woocommerce_template_loop_add_to_cart’, 20 );

add_filter( ‘wc_add_to_cart_message_html’, ‘__return_null’ );

// don’t display url field in comments form
function ds_customize_divi_comments_url_field ($fields) {
// Remove the website url field
if(isset($fields[‘url’]))
unset($fields[‘url’]);
return $fields;
}
add_filter(‘comment_form_default_fields’, ‘ds_customize_divi_comments_url_field’);

add_filter( ‘comment_form_default_fields’, ‘tu_comment_form_change_cookies_consent’ );

function tu_comment_form_change_cookies_consent( $fields ) {

      $commenter = wp_get_current_commenter();

      $consent   = empty( $commenter[‘comment_author_email’] ) ? ” : ‘ checked=”checked”‘;

      $fields[‘cookies’] = ‘<p class=”comment-form-cookies-consent”><input id=”wp-comment-cookies-consent” name=”wp-comment-cookies-consent” type=”checkbox” value=”yes”‘ . $consent . ‘ />’ .

                                                       ‘<label for=”wp-comment-cookies-consent”>Save my name and email in this browser for the next time I comment</label></p>’;

      return $fields;

}

add_filter( 'woocommerce_states', 'custom_ca_states', 10, 1 );

function custom_ca_states( $states ) {

    $non_allowed_ca_states = array( 'MB', 'SK' );

    // Loop through your non allowed us states and remove them

    foreach( $non_allowed_ca_states as $state_code ) {

        if ( isset($states['CA'][$state_code]) ) {

            unset( $states['CA'][$state_code] );

        }

    }

    return $states;

}

/**

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer