• Resolved Karolina Vyskocilova

    (@vyskoczilova)


    Hi guys, could you help me? How I could hook in my custom service for calculating the rates? I can write my own class, that’s clear, but how do I hook it in properly? Thanks!

    $this->exchange_rate_services->add_service( 'fixerio', new WCML_Exchange_Rates_Fixerio() );

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello Karolina

    • This reply was modified 6 years, 3 months ago by sergey.r.

    Hello Karolina,
    you don’t need a hook here you can access add_service via $woocommerce_wpml->multi_currency->exchange_rate_services->add_service()
    One note – you can do this only after WCML initialize exchange_rate_services class ( on init for example )

    Thread Starter Karolina Vyskocilova

    (@vyskoczilova)

    Hi George,
    thanks a lot! I will have a look at it pretty soon, we need to use exchange rate based on the national bank in order to use it in accounting ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Extending: Hook in new service’ is closed to new replies.