erro de php

Olá!

O WordPress possui um recurso integrado que detecta quando um plugin ou tema causa um erro fatal em seu site e notifica você com este e-mail automatizado.

Neste caso, o WordPress detectou um erro com o seu plugin: Elementor Pro.

Primeiro, visite o seu site (https://lojadgrau.com/) e verifique se há algum problema visível. Em seguida, visite a página em que o erro foi encontrado (Acessar ‹ Dgrau Uniformes — WordPress) e verifique se há algum problema visível.

Entre em contato com equipe de suporte onde você hospeda o seu site para obter ajuda para investigar esse problema.

Se o seu site parece estar quebrado e você não pode acessar seu painel de controle como de costume, o WordPress agora tem um “modo de restauração” especial. Isso permite que você acesse seu painel com segurança e investigue mais.

https://lojadgrau.com/wp-login.php?action=enter_recovery_mode&rm_token=inKSBnzJhQ9cWKbzKAYw7M&rm_key=oqeGoGMzQZUNqqyXkzO8BM

Para manter seu site seguro, esse link expirará em 1 dia. Não se preocupe com isso, no entanto, um novo link será enviado por e-mail para você se o erro ocorrer novamente depois que o link expirar.

Ao procurar ajuda com esse problema, podem solicitar que você forneça algumas das seguintes informações:
WordPress versão 6.5
Tema atual: Hello Elementor (versão 3.0.1)
Plugin atual: Elementor Pro (versão 3.20.2)
PHP versão 8.2.17

Detalhes do erro

Um erro do tipo E_ERROR foi causado na linha 1712 do arquivo /home1/dgraun94/lojadgrau.com/wp-content/plugins/elementor-pro/modules/woocommerce/widgets/purchase-summary.php. Mensagem de erro: Uncaught Error: Call to undefined method Automattic\WooCommerce\Admin\Overrides\OrderRefund::get_order_key() in /home1/dgraun94/lojadgrau.com/wp-content/plugins/elementor-pro/modules/woocommerce/widgets/purchase-summary.php:1712
Stack trace:
#0 /home1/dgraun94/lojadgrau.com/wp-content/plugins/elementor-pro/modules/woocommerce/widgets/purchase-summary.php(1636): ElementorPro\Modules\Woocommerce\Widgets\Purchase_Summary->set_preview_order()
#1 /home1/dgraun94/lojadgrau.com/wp-content/plugins/elementor/includes/base/controls-stack.php(2321): ElementorPro\Modules\Woocommerce\Widgets\Purchase_Summary->render()
#2 /home1/dgraun94/lojadgrau.com/wp-content/plugins/elementor/includes/base/widget-base.php(634): Elementor\Controls_Stack->render_by_mode()
#3 /home1/dgraun94/lojadgrau.com/wp-content/plugins/elementor/includes/base/widget-base.php(758): Elementor\Widget_Base->render_content()
#4 /home1/dgraun94/lojadgrau.com/wp-content/plugins/elementor/includes/base/element-base.php(551): Elementor\Widget_Base->get_raw_data(true)
#5 /home1/dgraun94/lojadgrau.com/wp-content/plugins/elementor/core/base/document.php(1067): Elementor\Element_Base->get_raw_data(true)
#6 /home1/dgraun94/lojadgrau.com/wp-content/plugins/elementor/core/base/document.php(723): Elementor\Core\Base\Document->get_elements_raw_data(Array, true)
#7 /home1/dgraun94/lojadgrau.com/wp-content/plugins/elementor/includes/base/controls-stack.php(1066): Elementor\Core\Base\Document->get_initial_config()
#8 /home1/dgraun94/lojadgrau.com/wp-content/plugins/elementor/core/editor/loader/common/editor-common-scripts-settings.php(35): Elementor\Controls_Stack->get_config()
#9 /home1/dgraun94/lojadgrau.com/wp-content/plugins/elementor/core/editor/loader/v2/editor-v2-loader.php(134): Elementor\Core\Editor\Loader\Common\Editor_Common_Scripts_Settings::get()
#10 /home1/dgraun94/lojadgrau.com/wp-content/plugins/elementor/core/editor/editor.php(358): Elementor\Core\Editor\Loader\V2\Editor_V2_Loader->enqueue_scripts()
#11 /home1/dgraun94/lojadgrau.com/wp-includes/class-wp-hook.php(324): Elementor\Core\Editor\Editor->enqueue_scripts(‘’)
#12 /home1/dgraun94/lojadgrau.com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(‘’, Array)
#13 /home1/dgraun94/lojadgrau.com/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#14 /home1/dgraun94/lojadgrau.com/wp-includes/script-loader.php(2265): do_action(‘wp_enqueue_scri…’)
#15 /home1/dgraun94/lojadgrau.com/wp-includes/class-wp-hook.php(324): wp_enqueue_scripts(‘’)
#16 /home1/dgraun94/lojadgrau.com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(‘’, Array)
#17 /home1/dgraun94/lojadgrau.com/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#18 /home1/dgraun94/lojadgrau.com/wp-includes/general-template.php(3050): do_action(‘wp_head’)
#19 /home1/dgraun94/lojadgrau.com/wp-content/plugins/elementor/includes/editor-templates/editor-wrapper.php(31): wp_head()
#20 /home1/dgraun94/lojadgrau.com/wp-content/plugins/elementor/core/editor/loader/v2/editor-v2-loader.php(180): include(‘/home1/dgraun94…’)
#21 /home1/dgraun94/lojadgrau.com/wp-content/plugins/elementor/core/editor/editor.php(163): Elementor\Core\Editor\Loader\V2\Editor_V2_Loader->print_root_template()
#22 /home1/dgraun94/lojadgrau.com/wp-includes/class-wp-hook.php(324): Elementor\Core\Editor\Editor->init(‘’)
#23 /home1/dgraun94/lojadgrau.com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(‘’, Array)
#24 /home1/dgraun94/lojadgrau.com/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#25 /home1/dgraun94/lojadgrau.com/wp-admin/admin.php(419): do_action(‘admin_action_el…’)
#26 /home1/dgraun94/lojadgrau.com/wp-admin/post.php(12): require_once(‘/home1/dgraun94…’)
#27 {main}
thrown

Hi @artedgrauniformes

I can’t see if this is related to Cloudflare, but while you are troubleshooting, you can Pause Cloudflare, so you can make sure the website is up and running before you activate Cloudflare again.

Also make sure that you do not see any false positives in your security dashboard, that hinders your domain/php/plugins to be updated.

You can search for a blocked or challenged request in the Security app under the Overview tab in the Firewall Events section of your Cloudflare Dashboard.

Understanding Cloudflare Firewall Analytics

The Cloudflare WAF contains mainly 2 packages:

  • Cloudflare Managed Ruleset: These rules are managed by Cloudflare WAF Engineers.
  • OWASP ModSecurity Core Rule Set: These rules are not managed by Cloudflare. They are created by the OWASP Group and Cloudflare integrates with this OWASP package as part of our WAF for additional security.

For “security reasons”, we don’t provide the rule patterns, as this would increase the likelihood that a malicious party could learn to bypass the rules. However, If you would like to know why a WAF rule has triggered, you can enable the payload logging feature. This feature is only available for customers on an Enterprise plan. It allows you to log the request information that triggered a specific rule of a Managed Ruleset. This information is known as the payload. Payload logging is especially useful when diagnosing the behavior of WAF rules. Since the values that triggered a rule may contain sensitive data, they are encrypted with a customer-provided public key so that only you can examine them later.

If you’re encountering false positive due to the legacy WAF, there are 5 actions that you could take here:

  1. Add the IP(s) doing the request to the IP Access Rules in the allowlist, if the users connecting to your backend are always using the same IP address.
    This is the best solution as it does not affect the site security.
    How do I control IP access to my site?

  2. Disable the affected WAF rule(s)
    This will reduce the security of the site, but will stop the requests from getting blocked/challenged.
    How do I configure the WAF?

  3. Skip the WAF with a Firewall Rule
    You can create a Firewall Rule with the skip action for the WAF to be deactivated for a specific combination of parameters. You could for example only bypass the WAF for a specific URL and a specific IP or user-agent:
    Firewall rules actions · Cloudflare Firewall Rules (deprecated) docs

  4. Disable the Web Application Firewall from the requested endpoint (not recommended!)
    This will result in lower security, as the WAF will no longer be applicable on that location.
    This action is done by using Page Rules:
    Understanding and Configuring Cloudflare Page Rules (Page Rules Tutorial)

  5. If the rule blocking is 981176 (legacy OWASP), it means it was blocked by the OWASP rules. You need then to decrease the OWASP sensitivity: a request was blocked by rule 981176, what does that mean?. If decreasing the OWASP sensitivity doesn’t solve the issue, you might need to apply one of the other actions described above (1, 2, 3 or 4).

If you’re encountering false positive due to the new WAF, there are two actions that you could take here:

  1. Add WAF Exception
    You can define WAF exceptions in the Cloudflare dashboard or using the Rulesets API.

  2. If the rule blocking is 949110 (new OWASP), it means it was blocked by the OWASP rules. You need then to decrease the OWASP Anomaly Score Threshold or lower the OWASP Paranoia Level.

1 Like