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.
4 Responses
Deprecated: Function Elementor\DB::is_built_with_elementor is deprecated since version 3.2.0! Use Plugin::$instance->documents->get( $post_id )->is_built_with_elementor() instead. in /home/k33xmzjq5e6w/public_html/wp-includes/functions.php on line 5380
please resolve this error shorty
Sam,
This method was deprecated in Elementor 3.2.
One of your addons is still using `Elementor\DB::is_built_with_elementor()`, it should be replaced with `Elementor\Plugin::$instance->documents->get( $post_id )->is_built_with_elementor()`.
Contact the addon developer and ask him to read about the Elementor Deprecation Process.
Hi Rami,
We’re seeing the following errors in console after the 3.7+ update:
`$e.modules.document.CommandHistory` is soft deprecated since 3.7.0
These aren’t mentioned in any deprecation notices in your blog post above. Instead, it seems to be linked to replacing elementorCommon with elementorDevTools, albeit with some components not being initialised.
There seem to be some bug reports that are linked to this as well:
* https://github.com/elementor/elementor/issues/19456
* https://github.com/elementor/elementor/issues/19390
Can you point us in the right direction on what we need to look at changing? The only changes we’ve made are how widgets are being registered as described here: https://wordpress.org/support/topic/referenceerror-elementordevtools-is-not-defined/ –> This removed the elementorDevTools is not defined error, but then kicked up deprecation notices above.
Thanks!
I’m seeing this warning on the console:
`requireContainer` is soft deprecated since 3.7.0 – Use `Extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase“ instead
But there is not documentation that explain how we need to change that, and seems is like from “elementor” and not from the others customs widgets that we have, which is the direction that we need to take?