Problems with updating Divi Theme from Elegant Themes

Good day All,

My first post here and working with MainWP about 2 weeks now. :slight_smile:
Using not all my websites with MainWP, because I want to test it first before to switch from ManageWP to MainWP completely.

Today the first time that there is an update of the Divi Theme and now I see that there were more people having problems with the Premium Divi theme.
I get update notice and can update, but it doesn’t show as updated. Also old and new are the same version. And it says inactive…
When I log on the website and go to the update section and logout and refresh the MainWP Dashboard, that website (childsite0 is updated…
I added the PHP script as mentioned here Premium Theme Updates Not Detected - MainWP Documentation
This is the script I’ve added:

add_filter( 'mainwp_request_update_premium_themes', 'hook_mainwp_request_update_premium_themes' );
function hook_mainwp_request_update_premium_themes( $premiums = array() ){
   $premiums[] = Divi;
   return $premiums;
}

But still it says it needs update:

I do use a child theme on does websites and also is the Divi Theme hidden with some codes in the function.php.

add_filter('wp_prepare_themes_for_js','kill_themes');
function kill_themes($themes) {
	
	unset($themes['Divi']);
	return $themes;
}

Thanks in advance!
Have a nice day!

Hi @Hermanos

Welcome to the MainWP Community.

Divi theme uses a non-standard way of updating the theme, and it can sometimes cause issues in MainWP.

Can you please elaborate on the “can update, but it doesn’t show as updated”? Does the update process on the MainWP Dashboard complete successfully? And where does it not show as updated?
It is labeled as Inactive on MainWP because the theme is in fact Inactive on the child site since you are using a Divi Child theme.

Can you temporarily remove that code that’s hiding the theme and see if that has any effect on the update process through MainWP Dashboard?

Thanks :slight_smile:

It doesn’t remove from the available updates and I can start the update again and again while old and new versions are the same.
But when I log in the website admin and click on Dashboard > Updates it will refresh as updated and when I logout and return to MainWP and sync child sites, it it updated in MainWP also.

Sounds logic to me :slight_smile:

I’ve removed it at all my child-theme websites so with the new update of Divi Theme we can test. I wanted it to test with the one remaining, but after login and logout it was updated, so not sure if it was because I removed the PHP script…

1 Like

This really sounds like the additional code is blocking the update check and feedback from the child site after the update. Only if you force it via the child site, it can also be refreshed in MainWP.

I have many child sites with Divi and they all show up and can be updated without extra code. So it should work if you remove both code snippets.

Why are you hiding the theme on the child site anyway?

Hi Jos,

Thanks for your reply!
You mean remove this code snippet which I added to the PHP section in MainWP?

add_filter( 'mainwp_request_update_premium_themes', 'hook_mainwp_request_update_premium_themes' );
function hook_mainwp_request_update_premium_themes( $premiums = array() ){
   $premiums[] = Divi;
   return $premiums;
}

In the beginning I made this to let the Divi Theme disappear, but with tools like BuiltWith you can always find out that it made with Divi. :slight_smile:
I’ve removed that already from the function.php. So, with the next update of Divi I can test it.

I assume you don’t use a child-theme with your websites?

The snippet in the functions.php to hide Divi was probably the cause, why you also needed the snippet on your dashboard to make the updates show up again.

Hiding the bricks you used to build a site shouldn’t be necessary and it’s very hard to become invisible. If you are ashamed that you used something, you should find a better alternative. If you hope to be less vulnerable for hackers, it won’t really help and you should install a security plugin.

A fair share of my clients with Divi have a child theme and that doesn’t impact my updates.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.