Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

Question / Issue

affiliate-toolkit throw error message after upgrading to new version:

Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to a member function get_css_container_class() on null

Answer / Solution

If you did some custom templates and you are using the more offers template you will get a error message. You can fix this if you replace the following lines.

Search for these lines:

@if(atkp_options::$loader->show_ count($formatter->get_offers($product, false)) > 0)
    @include($parameters->offerstemplate,['formatter' => $formatter, 'translator' => $translator, 'product' => $product])

replace it with that 3 lines:

@if($parameters->get_show_moreoffers() && count($formatter->get_offers($product, false)) > 0)
    @include($parameters->get_moreoffers_template(),['formatter' => $formatter, 'translator' => $translator, 'product' => $product, 'parameters' =>$parameters])
Updated: 6. February 2023
Still not using affiliate-toolkit?
Setup takes less than 5 minutes and you can start to import first products!
Learn more about the packagesDownload FREE Version
Still need help?
Submit Your Question
Please give us the details, our support team will get back to you.
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram