Different price coefficient by category – WooCommerce

I have a site (WordPress and WooCommerce) that uses a product scraping script. In it, it is set that all products and categories have the same margin coefficient as follows:

$koef = 1;// If you need add 25% – set $koef = 1.25, if 55% – $koef = 1.55, if 120% – $koef = 2.2

I want some categories to have a margin of 10%, some 5%, some 30%, etc.

How could I separate it?

I set the percentage in WooCommerce, but after each product update, the prices are 0,00 €