Hey all! We are getting ready to release version 3.7.
If you are a developer who extends Elementor please review the below changes to keep your plugin up and running.
Here are the planned deprecations:
PHP
Functions & Methods
Soft Deprecation
When a function/method is in the soft deprecation phase, it means that the function/method will still work while it’s in this phase, but a comment will be placed in the code mentioning the upcoming deprecation.
Function / Method Name | Changes made |
woocommerce_get_remove_url() Pro Plugin | Replaced by: none Located in: modules/woocommerce/widgets/cart.php Hard deprecation version: 4.1.0 Deletion version: 4.5.0 |
Common::get_responsive_device_args() Pro Plugin | Replaced by: none Located in: includes/widgets/common.php Hard deprecation version: 4.1.0 Deletion version: 4.5.0 |
Hard Deprecation
When a function/method is on hard deprecation phase, it means that the function/method will still work while it’s in this phase, but will add a PHP notice if the website WP_DEBUG property is set to true.
Function / Method Name | Changes made |
Utils::get_create_new_post_url() Core Plugin | Replaced by: Plugin::$instance->documents->get_create_new_post_url() Located in: includes/utils.php Soft deprecation version: 3.3.0 Deletion version: 4.1.0 |
Deletion
When a function/method is on deletion phase, it means that the function/method will not work anymore, and will most likely throw a Fatal Error when it’s called.
Function / Method Name | Changes made |
License\Admin::is_license_about_to_expire() Pro Plugin | Replaced by: License\Api::is_license_about_to_expire() Located in: license/admin.php Soft deprecation version: 2.9.0 Hard deprecation version: 3.3.0 |
JS
Elementor 3.7 improved the JS deprecation mechanism from a manual tagging system to an automated system . In the past, we had to tag each version the methods that transformed from soft-deprecation to hard-deprecation. This mechanism was replaced with a system that auto-calculates whether the deprecated code is in a soft-deprecation period or in a hard-deprecation period. Depending on the deprecation period, the system knows which type of error to throw.
In addition, in previous Elementor versions some JS methods that should have been marked as “hard deprecated” where in fact marked as “soft deprecated”. External developers using those methods did not see the proper console log errors. This is why we decided not to delete those methods in Elementor 3.7.0. Those methods will have a longer deprecation period to make sure that developers will have more time to replace them.