Skip to content

Fix "Fatal error: Uncaught Error: Call to undefined function wc_get_o… #179

Fix "Fatal error: Uncaught Error: Call to undefined function wc_get_o…

Fix "Fatal error: Uncaught Error: Call to undefined function wc_get_o… #179

Triggered via push December 20, 2023 08:28
Status Failure
Total duration 1m 14s
Artifacts

ci.yaml

on: push
Matrix: phplint / phplint
Fit to window
Zoom out
Zoom in

Annotations

12 errors
phpcs / phpcs: src/Extension.php#L1310
"$this" can no longer be used in a plain function or method since PHP 7.1.
phpcs / phpcs
Process completed with exit code 1.
phpstan / phpstan: src/Extension.php#L588
Cannot call method get_meta() on WC_Order|WC_Order_Refund|true.
phpstan / phpstan: src/Extension.php#L588
Cannot cast mixed to int.
phpstan / phpstan: src/Extension.php#L672
Parameter #2 ...$values of function sprintf expects bool|float|int|string|null, mixed given.
phpstan / phpstan: src/Extension.php#L704
Cannot call method get_type() on WC_Order|WC_Order_Refund|true.
phpstan / phpstan: src/Extension.php#L720
Parameter #1 $order of static method Pronamic\WordPress\Pay\Extensions\WooCommerce\WooCommerce::get_payment_method_title() expects WC_Order, WC_Order|WC_Order_Refund|true given.
phpstan / phpstan: src/Extension.php#L730
Parameter #1 $text of function esc_html expects string, int|null given.
phpstan / phpstan: src/Extension.php#L731
Parameter #1 $text of function esc_html expects string, mixed given.
phpstan / phpstan: src/Extension.php#L732
Parameter #1 $text of function esc_html expects string, string|null given.
phpstan / phpstan: src/Extension.php#L755
Cannot call method get_status() on WC_Order|WC_Order_Refund|true.
phpstan / phpstan: src/Extension.php#L755
Cannot call method needs_payment() on WC_Order|WC_Order_Refund|true.