Sunday, 15 February 2015

php - Strict Standards: Declaration of ' ' should be compatible with ' ' -


PHP 5.4 is installed on woocommerce 2.0 (Wordpress), and I found:

P> Strict criteria : WC_Gateway_BACS :: Process_payment () Announces DC: \ my \ path \ to \ htdocs \ wordpress \ plugins \ woocommerce \ classes \ WC_Payment_Gateway :: process_payment () needed. On the gateway \ bacs \ class-wc-gateway-bacs.php line ...

I check the files and found that WC_Payment_Gateway is not a way process_payment () . I need to know how to solve it ( error_reporting () not by setting.

Strict criteria What exactly does PHP get? - In what situation do we get that error?

WC_Payment_Gateway defined abstract-wc-payment-gateway.php and declares a method

  function process_payment () {}   < P> While  WC_Gateway_BACS  defines it  
  function process_payment ($ order_id) {...   

(Maybe you mixed Ho WC_Payment_Gateway and WC_Pay Ment_gateway s ).

Therefore, different signatures (0 parameters vs. 1 parameter) -> Strict error.
Since it seems that * always with a parameter Can be used which you can change

  function process_payment () {}   

to

  function process_prime ($ Order_id) {} ​​  

(*) Keep in mind that I only know woocommerce since the last five minutes, so do not take my word for it.

No comments:

Post a Comment