error in snippet-ops.php
-
Hello!
I noticed the following messages in error log:
2024/12/09 16:31:33 [error] 1237062#1237062: *2013129 FastCGI sent in stderr: “PHP message: PHP Warning: Attempt to read property “total” on null in /mysite.ru/wp-content/plugins/code-snippets/php/snippet-ops.php(582) : eval()’d code on line 9; PHP message: PHP Fatal error: Uncaught Error: Call to a member function get() on null in /mysite.ru/wp-content/plugins/code-snippets/php/snippet-ops.php(582) : eval()’d code:13
I suppose that the error could be in snippet code. Here is it from line 9:
if ( WC()->cart->total > 250000 ) {
unset( $available_gateways['cod'] );
unset( $available_gateways['tbank'] );
}What’s wrong?
Regards, Alex
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘error in snippet-ops.php’ is closed to new replies.