Skip to content

Commit

Permalink
Fix standard code
Browse files Browse the repository at this point in the history
  • Loading branch information
ponddeja committed Jul 2, 2024
1 parent a37dce6 commit 385cb42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion includes/OrderFlow/InstantSettle.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function process_instant_settle( WC_Order $order ) {
* @param WC_Order $order order to get items.
*/
$invoice = reepay()->api( $order )->get_invoice_data( $order );
if ( isset($invoice['state']) && 'settled' === $invoice['state'] ) {
if ( isset( $invoice['state'] ) && 'settled' === $invoice['state'] ) {
$order->add_meta_data( '_is_instant_settled', '1' );
$order->save_meta_data();
}
Expand Down
2 changes: 1 addition & 1 deletion includes/OrderFlow/OrderCapture.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public function multi_settle( WC_Order $order ): bool {
$total_all = 0;

$invoice_data = reepay()->api( $order )->get_invoice_by_handle( 'order-' . $order->get_id() );
if ( is_array($invoice_data) && array_key_exists( 'order_lines', $invoice_data ) ) {
if ( is_array( $invoice_data ) && array_key_exists( 'order_lines', $invoice_data ) ) {
foreach ( $invoice_data['order_lines'] as $invoice_line ) {
$is_exist = false;
foreach ( $order->get_items( 'fee' ) as $item ) {
Expand Down

0 comments on commit 385cb42

Please sign in to comment.