From e1574725c1875de2d1b92336e7b8e8c8ff5b402c Mon Sep 17 00:00:00 2001 From: Geoff Taylor Date: Wed, 27 Dec 2023 11:10:33 -0500 Subject: [PATCH] chore: Linter and PHPStan compliance met --- includes/utils/class-session-transaction-manager.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/includes/utils/class-session-transaction-manager.php b/includes/utils/class-session-transaction-manager.php index a9ece177..36b53c17 100644 --- a/includes/utils/class-session-transaction-manager.php +++ b/includes/utils/class-session-transaction-manager.php @@ -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 ); } /** @@ -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] ) ) { @@ -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;