Skip to content

Commit

Permalink
chore: Linter and PHPStan compliance met
Browse files Browse the repository at this point in the history
  • Loading branch information
kidunot89 committed Dec 27, 2023
1 parent ebaafd3 commit e157472
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions includes/utils/class-session-transaction-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function __construct( &$session_handler ) {

add_action( 'graphql_before_resolve_field', [ $this, 'update_transaction_queue' ], 10, 4 );
add_action( 'graphql_mutation_response', [ $this, 'pop_transaction_id' ], 20, 6 );
add_action( 'woo_session_transaction_complete', [ $this->session_handler, 'save_if_dirty' ], 10 );
add_action( 'woographql_session_transaction_complete', [ $this->session_handler, 'save_if_dirty' ], 10 );
}

/**
Expand Down Expand Up @@ -155,7 +155,6 @@ public function update_transaction_queue( $source, $args, $context, $info ) {
public function next_transaction() {
// Update transaction queue.
$transaction_queue = $this->get_transaction_queue();
header( 'CODECEPT_DEBUG: ' . json_encode( array_column( $transaction_queue, 'transaction_id' ) ) );

// If lead transaction object invalid pop transaction and loop.
if ( ! is_array( $transaction_queue[0] ) ) {
Expand Down Expand Up @@ -241,10 +240,10 @@ public function pop_transaction_id( $payload, $input, $unfiltered_input, $contex
/**
* Mark transaction completion
*
* @param $transition_id Removed transaction ID.
* @param $transaction_queue Transaction Queue.
* @param string|null $transition_id Removed transaction ID.
* @param array $transaction_queue Transaction Queue.
*/
do_action( 'woo_session_transaction_complete', $this->transaction_id, $transaction_queue );
do_action( 'woographql_session_transaction_complete', $this->transaction_id, $transaction_queue );

// Clear transaction ID.
$this->transaction_id = null;
Expand Down

0 comments on commit e157472

Please sign in to comment.