• I have just installed YITH WooCommerce Ajax Product Filter (yith-woocommerce-ajax-navigation) 4.9.0 with WordPress 5.9.3, WooCommerce 6.4.1 and Elementor 3.6.4.

    When I edit a page in Elementor, I get the following message:

    [17-Apr-2022 15:19:50 UTC] PHP Deprecated: _content_template is deprecated since version 2.9.0! Use Elementor\Controls_Stack::content_template() instead. in C:\wamp64\www\dev0.local\wordpress\wp-includes\functions.php on line 5323
    [17-Apr-2022 15:19:50 UTC] PHP Stack trace:
    [17-Apr-2022 15:19:50 UTC] PHP 1. {main}() C:\wamp64\www\dev0.local\wordpress\wp-admin\post.php:0
    [17-Apr-2022 15:19:50 UTC] PHP 2. require_once() C:\wamp64\www\dev0.local\wordpress\wp-admin\post.php:12
    [17-Apr-2022 15:19:50 UTC] PHP 3. do_action($hook_name = ‘admin_action_elementor’) C:\wamp64\www\dev0.local\wordpress\wp-admin\admin.php:419
    [17-Apr-2022 15:19:50 UTC] PHP 4. WP_Hook->do_action($args = [0 => ”]) C:\wamp64\www\dev0.local\wordpress\wp-includes\plugin.php:474
    [17-Apr-2022 15:19:50 UTC] PHP 5. WP_Hook->apply_filters($value = ”, $args = [0 => ”]) C:\wamp64\www\dev0.local\wordpress\wp-includes\class-wp-hook.php:331
    [17-Apr-2022 15:19:50 UTC] PHP 6. Elementor\Core\Editor\Editor->init($die = ”) C:\wamp64\www\dev0.local\wordpress\wp-includes\class-wp-hook.php:307
    [17-Apr-2022 15:19:50 UTC] PHP 7. Elementor\Core\Editor\Editor->print_editor_template() C:\wamp64\www\dev0.local\wordpress\wp-content\plugins\elementor\core\editor\editor.php:158
    [17-Apr-2022 15:19:50 UTC] PHP 8. include() C:\wamp64\www\dev0.local\wordpress\wp-content\plugins\elementor\core\editor\editor.php:317
    [17-Apr-2022 15:19:50 UTC] PHP 9. wp_footer() C:\wamp64\www\dev0.local\wordpress\wp-content\plugins\elementor\includes\editor-templates\editor-wrapper.php:71
    [17-Apr-2022 15:19:50 UTC] PHP 10. do_action($hook_name = ‘wp_footer’) C:\wamp64\www\dev0.local\wordpress\wp-includes\general-template.php:3058
    [17-Apr-2022 15:19:50 UTC] PHP 11. WP_Hook->do_action($args = [0 => ”]) C:\wamp64\www\dev0.local\wordpress\wp-includes\plugin.php:474
    [17-Apr-2022 15:19:50 UTC] PHP 12. WP_Hook->apply_filters($value = ”, $args = [0 => ”]) C:\wamp64\www\dev0.local\wordpress\wp-includes\class-wp-hook.php:331
    [17-Apr-2022 15:19:50 UTC] PHP 13. Elementor\Core\Editor\Editor->wp_footer(”) C:\wamp64\www\dev0.local\wordpress\wp-includes\class-wp-hook.php:307
    [17-Apr-2022 15:19:50 UTC] PHP 14. Elementor\Widgets_Manager->render_widgets_content() C:\wamp64\www\dev0.local\wordpress\wp-content\plugins\elementor\core\editor\editor.php:821
    [17-Apr-2022 15:19:50 UTC] PHP 15. Elementor\Controls_Stack->print_template() C:\wamp64\www\dev0.local\wordpress\wp-content\plugins\elementor\includes\managers\widgets.php:448
    [17-Apr-2022 15:19:50 UTC] PHP 16. Elementor\Modules\DevTools\Deprecation->deprecated_function($function = ‘_content_template’, $version = ‘2.9.0’, $replacement = ‘Elementor\\Controls_Stack::content_template()’, $base_version = *uninitialized*) C:\wamp64\www\dev0.local\wordpress\wp-content\plugins\elementor\includes\base\controls-stack.php:1949
    [17-Apr-2022 15:19:50 UTC] PHP 17. _deprecated_function($function = ‘_content_template’, $version = ‘2.9.0’, $replacement = ‘Elementor\\Controls_Stack::content_template()’) C:\wamp64\www\dev0.local\wordpress\wp-content\plugins\elementor\modules\dev-tools\deprecation.php:239
    [17-Apr-2022 15:19:50 UTC] PHP 18. trigger_error($message = ‘_content_template is deprecated since version 2.9.0! Use Elementor\\Controls_Stack::content_template() instead.’, $error_type = 16384) C:\wamp64\www\dev0.local\wordpress\wp-includes\functions.php:5323

    This appears to be because the function _content_template() is defined in /yith-woocommerce-ajax-navigation/includes/elementor/class-yith-wcan-elementor-reset-button.php at line [131].

    Please advise.
    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support crodriguez1991

    (@crodriguez1991)

    Hello there,

    Thanks for contacting us and I hope you’re doing well ??

    Thanks for report this deprecated method. Our developers will fix in the next release.

    If you want to have it now, you need to download and replace the file in the following path:

    yith-woocommerce-ajax-navigation/includes/elementor/class-yith-wcan-elementor-reset-button.php

    You can download the file in the following link

    Please try it and let me know.

    Have a good day

    Thread Starter garak734

    (@garak734)

    Hi,
    Thanks for the prompt response, I have tried the replacement function but the issue has not been fixed.
    The function _content_template() is still present in the code and is still being identified as deprecated.
    If lines [145 – 147] are removed, the message no longer appears and elementor processes the content_template() function without any problems:

    // protected function _content_template() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
    // $this->content_template();
    // }

    Hope that helps.

    Plugin Support crodriguez1991

    (@crodriguez1991)

    Hello there,

    Thanks for contacting us.

    Yes, you’re right. Seems Elementor ask for old code and it’s necessary to remove the deprecated code from our plugin in order to prevent the notice.

    We’ll remove the code in our next plugin update.

    I hope it helps you.

    Have a good day.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Deprecated _content_template reported by Elementor’ is closed to new replies.