• CONTACT
  • ABOUT US
Debugman Programming Blogs
  • HOME
  • HTML & CSS
  • PHP
  • CMS
    • WORDPRESS
  • JOOMLA
  • Web Hosting
  • Database
  • Miscellaneous

How to fix themify theme warning on theme-function.php file

Ilavarasan Ila/09 Mar, 18/1518/0
CMSPHPWORDPRESS

Today I got a call from one of our UAE client. He is having one e-commerce website. He wants to fix one warning error on their website. and I just checked their website I can see one warning error that related to theme function file. And I did google search then I found a lot of website having these warning errors. Finally, we fixed that warning error. Here I just want to share my code.

Warning error

The following website I can see the error


https://www.snowmasters.com/shop/

http://crescendo-graphics.com/

https://www.proboats.org/product-category/kayaks/

https://carigary.com/product/daily-jewelry/

https://southtownriders.com/lessons/

http://listeningafrica.com.ng/product/the-walkers/

https://www.oklahomacycling.com/product-category/the-jerseys

Below I have mentioned existing code and changed the code. So you have to change the code in theme-function.php file.

Old code

function themify_woocommerce_params($params){
return array_merge($params, array(
‘option_ajax_add_to_cart’ => ( ‘yes’ == get_option(‘woocommerce_enable_ajax_add_to_cart’) )? ‘yes’: ‘no’
) );
}

New code

function themify_woocommerce_params($params){
if(is_array($params)){
return array_merge($params, array(
‘option_ajax_add_to_cart’ => ( ‘yes’ == get_option(‘woocommerce_enable_ajax_add_to_cart’) )? ‘yes’: ‘no’
) );
}else{
return array(
‘option_ajax_add_to_cart’ => ( ‘yes’ == get_option(‘woocommerce_enable_ajax_add_to_cart’) )? ‘yes’: ‘no’
);
}
}

Thanks

Top Theme, Plugins Marketplace for wordpress,...

09 Mar, 18

Shared Hosting vs Managed wordpress hosting...

09 Mar, 18
Ilavarasan Ila
Online Media Expert | Web Consultant | Web Design | Web strategy I am a senior Wordpress developer with 5+ years of experience with a passion for building high-quality software and web products.

Related Posts

MiscellaneousPHPWeb Hosting

Solved; htaccess works in localhost but doesn’t...

CMSWeb HostingWORDPRESS

Shared Hosting vs Managed wordpress hosting difference...

CMSHTML & CSSPHPUncategorizedWORDPRESS

Top Theme, Plugins Marketplace for wordpress, Magento,...

Categories

  • CMS (9)
  • HTML & CSS (2)
  • Miscellaneous (3)
  • PHP (14)
  • Uncategorized (4)
  • Web Hosting (4)
  • WORDPRESS (13)

Recent Comments

    Tags

    404page admin template AWS basic test case codeigniter codeigniter not working in aws CSS disable directory ecommerce extesnion frontend UI GENERAL hosting htaccess htaccess not working html image upload issue interfax interfax customization logo making magento extensions magento themes mvc framework opencart opencart themes php php.ini file platform identifier platform lookup PLUGIN SERVER shared hosting shared hosting vs wordpress managed hosting technology lookup Testcase top market place web hosting WINDOWS woocommerce WORDPRESS wordpress hosting wordpress managed hosting wordpress themes

    Recent Posts

    Solved; htaccess works in localhost but...

    18 Dec, 18

    Shared Hosting vs Managed wordpress hosting...

    31 Aug, 18

    How to fix themify theme warning on...

    09 Mar, 18

    Social Icons

    [email protected] All Rights Reserved