wpc_update_sub_status

The WooCommerce Putler Connector wpc update sub status function.

Description

wpc_update_sub_status( $sub_id, $old_status, $new_status ); 

Parameters (3)

0. $sub_id
The sub id.
1. $old_status
The old status.
2. $new_status
The new status.

Usage

  1. if ( !function_exists( 'wpc_update_sub_status' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-putler-connector/woocommerce-putler-connector.php'; 
  3.  
  4. // The sub id. 
  5. $sub_id = null; 
  6.  
  7. // The old status. 
  8. $old_status = null; 
  9.  
  10. // The new status. 
  11. $new_status = null; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = wpc_update_sub_status($sub_id, $old_status, $new_status); 
  15.  

Defined (1)

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

/woocommerce-putler-connector.php  
  1. function wpc_update_sub_status( $sub_id, $old_status, $new_status ) { 
  2.  
  3. $sub_status = $new_status; 
  4.  
  5. wpc_init(); 
  6. if (method_exists($GLOBALS[putler_connector], 'post_order') ) { 
  7. $GLOBALS[putler_connector]->post_order( array('sub_id' => $sub_id,  
  8. 'old_status' => $old_status,  
  9. 'new_status' => $new_status) );