woocommerce_valid_order_statuses_for_payment_complete

woocommerce_valid_order_statuses_for_payment_complete

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

apply_filters('woocommerce_valid_order_statuses_for_payment_complete') is found 1 times:

  • /includes/class-wc-order.php line 152
    			 * @param array    $valid_completed_statuses Array of valid order statuses for payment complete.
    			 * @param WC_Order $this                     Order object.
    			 * @since 2.7.0
    			 */
    			$valid_completed_statuses = apply_filters( 'woocommerce_valid_order_statuses_for_payment_complete', array( OrderStatus::ON_HOLD, OrderStatus::PENDING, OrderStatus::FAILED, OrderStatus::CANCELLED ), $this );
    			if ( $this->has_status( $valid_completed_statuses ) ) {
    				if ( ! empty( $transaction_id ) ) {
    					$this->set_transaction_id( $transaction_id );
    				}
    				if ( ! $this->get_date_paid( 'edit' ) ) {
    					$this->set_date_paid( time() );
    

See this hook used in plugins: