ID : 0 ); if ( ! $order instanceof \WC_Order ) { return; } $requests = Requests::query( array( 'order_id' => $order->get_id() ), 20 ); if ( $requests ) { echo '
' . esc_html__( 'No return requests for this order.', 'returnkit' ) . '
'; } $check = Eligibility::check( $order, 'return' ); if ( $check['ok'] ) { if ( $check['deadline'] ) { /* translators: %s: date. */ echo '' . esc_html( sprintf( __( 'Returnable until %s.', 'returnkit' ), wp_date( get_option( 'date_format' ), (int) $check['deadline'] ) ) ) . '
'; } echo '' . esc_html__( 'Open the return form', 'returnkit' ) . '
'; echo '' . esc_html__( 'Opens the customer\'s return form for this order, for example to log a return you received by email or phone.', 'returnkit' ) . '
'; } }, null, 'order box' ); } }