woocommerce_payment_complete_order_status

The WooCommerce woocommerce payment complete order status hook.

Description

apply_filters( 'woocommerce_payment_complete_order_status', (unknown) $var, (unknown) $order_get_id, (unknown) $order ); 

Parameters (3)

0. $var (unknown)
The order needs processing processing completed.
1. $order_get_id (unknown)
The order get id.
2. $order (unknown)
The order.

Usage

To run the hook, copy the example below.
  1. $var = apply_filters( 'woocommerce_payment_complete_order_status', $var, $order_get_id, $order ); 
  2.  
  3. if ( !empty( $var ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the woocommerce_payment_complete_order_status callback 
  2. function filter_woocommerce_payment_complete_order_status( $var, $order_get_id, $order ) { 
  3. // make filter magic happen here... 
  4. return $var
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_payment_complete_order_status', 'filter_woocommerce_payment_complete_order_status', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_payment_complete_order_status', 'filter_woocommerce_payment_complete_order_status', 10, 3 ); 

Defined (4)

The filter is defined in the following location(s).

/includes/data-stores/class-wc-order-data-store-cpt.php  
  1. if ( ! $order->get_date_paid( 'edit' ) && version_compare( $order->get_version( 'edit' ), '3.0', '<' ) && $order->has_status( apply_filters( 'woocommerce_payment_complete_order_status', $order->needs_processing() ? 'processing' : 'completed', $order->get_id(), $order ) ) ) { 
/includes/class-wc-order.php  
  1. $this->set_status( apply_filters( 'woocommerce_payment_complete_order_status', $this->needs_processing() ? 'processing' : 'completed', $this->get_id(), $this ) ); 
  1. if ( ! $this->get_date_paid( 'edit' ) && $this->has_status( apply_filters( 'woocommerce_payment_complete_order_status', $this->needs_processing() ? 'processing' : 'completed', $this->get_id(), $this ) ) ) { 
  1. if ( 'view' === $context && ! $date_paid && version_compare( $this->get_version( 'edit' ), '3.0', '<' ) && $this->has_status( apply_filters( 'woocommerce_payment_complete_order_status', $this->needs_processing() ? 'processing' : 'completed', $this->get_id(), $this ) ) ) {