Fix psalm

This commit is contained in:
Emili Castells Guasch 2023-08-02 16:08:46 +02:00
parent 2cf7f23178
commit 33cda61017
2 changed files with 12 additions and 0 deletions

View file

@ -155,6 +155,12 @@ class OXXO {
add_action( add_action(
'add_meta_boxes', 'add_meta_boxes',
function( string $post_type ) { function( string $post_type ) {
/**
* Class and function exist in WooCommerce.
*
* @psalm-suppress UndefinedClass
* @psalm-suppress UndefinedFunction
*/
$screen = wc_get_container()->get( CustomOrdersTableController::class )->custom_orders_table_usage_is_enabled() $screen = wc_get_container()->get( CustomOrdersTableController::class )->custom_orders_table_usage_is_enabled()
? wc_get_page_screen_id( 'shop-order' ) ? wc_get_page_screen_id( 'shop-order' )
: 'shop_order'; : 'shop_order';

View file

@ -513,6 +513,12 @@ class PayUponInvoice {
add_action( add_action(
'add_meta_boxes', 'add_meta_boxes',
function( string $post_type ) { function( string $post_type ) {
/**
* Class and function exist in WooCommerce.
*
* @psalm-suppress UndefinedClass
* @psalm-suppress UndefinedFunction
*/
$screen = wc_get_container()->get( CustomOrdersTableController::class )->custom_orders_table_usage_is_enabled() $screen = wc_get_container()->get( CustomOrdersTableController::class )->custom_orders_table_usage_is_enabled()
? wc_get_page_screen_id( 'shop-order' ) ? wc_get_page_screen_id( 'shop-order' )
: 'shop_order'; : 'shop_order';