@@ -464,7 +464,7 @@ function view_order( $order_id ) {
464
464
$ order = wc_get_order ( $ order_id );
465
465
$ payu_gateways = WC_Payu_Gateways::gateways_list ();
466
466
if ( in_array ( $ order ->get_status (), [ 'on-hold ' , 'pending ' , 'failed ' ] ) ) {
467
- if ( @ $ payu_gateways [ $ order ->get_payment_method () ] && isset ( get_option ( 'payu_settings_option_name ' )['global_repayment ' ] ) ) {
467
+ if ( isset ( $ payu_gateways [ $ order ->get_payment_method () ]) && isset ( get_option ( 'payu_settings_option_name ' )['global_repayment ' ] ) ) {
468
468
$ pay_now_url = add_query_arg ( [
469
469
'pay_for_order ' => 'true ' ,
470
470
'key ' => $ order ->get_order_key ()
@@ -544,7 +544,7 @@ function filter_woocommerce_my_account_my_orders_actions( $actions, $order ) {
544
544
get_option ( 'payu_settings_option_name ' )['global_default_on_hold_status ' ]
545
545
] ) ) {
546
546
$ payu_gateways = WC_Payu_Gateways::gateways_list ();
547
- if ( @ $ payu_gateways [ $ order ->get_payment_method () ] && isset ( get_option ( 'payu_settings_option_name ' )['global_repayment ' ] ) ) {
547
+ if ( isset ( $ payu_gateways [ $ order ->get_payment_method () ]) && isset ( get_option ( 'payu_settings_option_name ' )['global_repayment ' ] ) ) {
548
548
$ actions ['repayu ' ] = [
549
549
'name ' => __ ( 'Pay with PayU ' , 'woo-payu-payment-gateway ' ),
550
550
'url ' => wc_get_endpoint_url ( 'order-pay ' , $ order ->get_id (),
@@ -565,7 +565,7 @@ function wc_order_item_add_action_buttons_callback( $order ) {
565
565
$ payu_gateways = WC_Payu_Gateways::gateways_list ();
566
566
$ payuOrderStatus = $ order ->get_meta ( '_payu_order_status ' , false , '' );
567
567
568
- if ( @ $ payu_gateways [ $ order ->get_payment_method () ] && ! isset ( get_option ( 'payu_settings_option_name ' )['global_repayment ' ] ) && $ payuOrderStatus ) {
568
+ if ( isset ( $ payu_gateways [ $ order ->get_payment_method () ]) && ! isset ( get_option ( 'payu_settings_option_name ' )['global_repayment ' ] ) && $ payuOrderStatus ) {
569
569
$ payu_statuses = WC_Payu_Gateways::clean_payu_statuses ( $ payuOrderStatus );
570
570
if ( ( ! in_array ( OpenPayuOrderStatus::STATUS_COMPLETED ,
571
571
$ payu_statuses ) && ! in_array ( OpenPayuOrderStatus::STATUS_CANCELED ,
0 commit comments