msmeets
Forum Replies Created
-
Forum: Plugins
In reply to: [Advanced Order Export For WooCommerce] Disable field roundingMy mistake looks like the values are correct!
I try to do the same with the shipping costs. The following filter returns a rounded value. Looks like get_shipping_total() ignores the parameters. Do you have any idea how to fix that?
//export Shipping line as Products
add_filter(‘woe_fetch_order_products’, function ($products,$order,$labels, $format, $static_vals) {
$i = count ($products);
foreach ( $order->get_items(‘shipping’) as $item_id=>$item ) {
$row = array();
$i++;
$taxes = $item->get_total_tax();
foreach ( $labels as $field => $label ) {
if ( $field == ‘item_price’ ) {
$row[‘item_price’] = $order->get_shipping_total( $item, false, false );
}
}
$products[] = $row;
}
return $products;
}, 10, 5);Matthijs
Forum: Plugins
In reply to: [Advanced Order Export For WooCommerce] Disable field roundingI see. The filter works. Unfortunately, these WordPress $order functions again return rounded values. Is this something I have to fix myself?
Other question. Is there also a filter for the WC_Product class? I have tried the following but it doesn’t seem to go well:
add_filter (“woe_fetch_product”, function ($row, $product) {}
Thanks again for your time.
Forum: Plugins
In reply to: [Advanced Order Export For WooCommerce] Disable field roundingNo problem, but what should I do to make the other fields not rounded in the export?
If I’m not mistaken those fields are not in the postmeta like _order_tax.
I hope you can help. This is essential for proper processing in the accounting system.
Forum: Plugins
In reply to: [Advanced Order Export For WooCommerce] Disable field roundingThat indeed seems to work, but in my case it concerns the following fields:
order_subtotal
order_shipping
order_total
order_total_tax
item_priceSorry for the confusion. I assumed there would be one adjustment for all fields.
Forum: Plugins
In reply to: [Advanced Order Export For WooCommerce] Disable field roundingThank you for your message.
Then I still get 0.82. While I expect 0.824862. Which Field format should I select? Does the tab where I add the field matter?
Below some extra info:
WooCommerce order values:
Total: 9,165138
Tax: 0.824862Values after export:
Total: 9.17
Tax: 0.82Settings:
Prices entered including VAT: Yes
Tax rate: 9%
Price: € 9.99Matthijs
Forum: Plugins
In reply to: [Advanced Order Export For WooCommerce] Disable field roundingHi Alex,
This setting is not enabled.
To rule things out I created a test environment with a clean installation of WordPress, Woocommerce and Advanced Order Export For WooCommerce. Unfortunately the same result.
Matthijs