New! – idealo for WooCommerce – The official idealo Plugin!

WooCommerce Cost of Goods support

In order to let idealo for WooCommerce work together with the plugin WooCommerce Cost of Goods you just need few lines of code. Let’s dig further into the topic.

Add an Action to connect with WooCommerce Cost of Goods

What you need to implement is only a WordPress action, that you can set for example in your functions.php theme file. Add into this the lines of code as shown here below:

add_action( 'idealo_order_import_finished', function(Dhii\Events\Event\EventInterface $e) {
	wc_cog()->set_order_cost_meta($e->getParam('wcOrder')->get_id());
});

In this way, WooCommerce Cost of Goods plugin is able to directly calculate the costs after a successful orders import from idealo.

Green Cyber Sale