[Resolved] – “t.hasOwnProperty is not a function” – Customizer Not Working – Learnpress JS Error

So far I have experienced “t.hasOwnProperty is not a function” error is shown in Learnpress only. However any plugin or website that use javascript hasOwnProperty function can show this error. This is a javascript error. So you cannot see this error in your webpage. To see a javascript error you need to inspect your webpage and open console. You can see this error in debugger and error logs. Here I will show how to resolve this error.

Resolve By Updating Plugin

Some of Learnpress versions have this error from 2.5.4 to Learnpress community has resolved the issue in next versions. So, if you are using a later version you should not see this error. But if you see this error you can apply this method to resolve your issue.

Manually uploading a plugin may loss all database related to the plugin. So, you should not upload the plugin manually. If you have no data in your database then you can feel free to upload a later version. Here you can find all available versions of Learnpress.

If you want to update to latest version then you can do this from your plugin page. This will not cause to any data loss. It may deactivate all Learnpress addons just.

For a better solution you can install another plugin to do this upgrade or downgrade job. There is a amazing plugin named “WP Rollback”. You can use this plugin to upgrade or downgrade any of your plugin without losing any data.

After installing and activating WP Rollback plugin you have to go to your plugin page. There you will see Rollback option just after each of your plugin. You will not find this option for premium plugins and plugins or addons which are not from wordpress library.

Click on Rollback option. A window will be opened with all available versions of the specific plugin. Select the plugin version and click on Rollback button to rollback to the specific version.

Now check you website customizer again. Hope your issue is resolved successfully.

Resolve By Updating Code

If the previous process is not working then you can apply this method. But if you are not expert in PHP this method is not recommended for you. In this method you need to update a file from your file manager. You can access your file manager from your cPanel. After opening file manager go to the following repository.


Find the code below and delete the snippet:

&& (h.isEmptyObject = function (t) {
var e;
for (e in t) if (t.hasOwnProperty (e)) return! 1;
return! 0

If you are unable to find the code snippet you just update your file using this file. But be sure you kept a backup before updating your file.

Hope you have resolved your issue successfully. So, have a comment. Thanks.