Adil Elsaeed

Senior WordPress Developer

IT Consultant

Freelancer

Adil Elsaeed

Senior WordPress Developer

IT Consultant

Freelancer

Blog Post

Fix Easy Digital Downloads Updater Class Error in PHP 8

15 September,2022 WordPress

If you are using EDD for selling your WordPress theme, and using “EDD Software Licenses” updater to handle theme updates, you may notice error when your client trying to update your theme, error message said:

The site is experiencing technical difficulties. Please contact your administrator for assistance with investigating this issue further.

EDD theme updater class error

This exactly what our clients who use PHP 8 for their website get’s when trying to update our premium themes (We use EDD software licencing on ar-themes.com) and by further debugging we found that the error caused by the line 120 on EDD_Theme_Updater class (theme-updater-class.php file), which need to be modified in order to work with PHP 8.

Luckily there is an update to this class on (EDD Software Licensing plugin) which fix the problem you can replace the class or just edit “theme_update_transient” function body, replacing current function code by the following code:

public function theme_update_transient( $value ) {
		$update_data = $this->check_for_update();
		if ( $update_data ) {

			if ( ! is_object( $value ) ) {
				$value = new stdClass;
			}

			// Make sure the theme property is set. See issue 1463 on Github in the Software Licensing Repo.
			$update_data['theme'] = $this->theme_slug;

			if ( version_compare( $this->version, $update_data['new_version'], '<' ) ) {
				$value->response[ $this->theme_slug ] = $update_data;
			} else {
				$value->no_update[ $this->theme_slug ] = $update_data;
			}
		}

		return $value;
	}

I hope this article helps you to fix Easy Digital Downloads updater class error on PHP 8.

Open chat
1
Hello👋
Can I help you?