wc_spg_default_order_status

The WooCommerce Simple Payment Gateway wc spg default order status hook.

Description

apply_filters( 'wc_spg_default_order_status', (string) $on_hold ); 

Parameters (1)

0. $on_hold (string) => 'on-hold'
The on hold.

Usage

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

Defined (1)

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

/woo-simple-payment-gateway.php  
  1. $order->update_status( apply_filters( 'wc_spg_default_order_status', 'on-hold' ), __( 'Awaiting payment', 'wc_spg' ) );