wpc_sub_created

The WooCommerce Putler Connector wpc sub created function.

Description

wpc_sub_created( $sub_obj, $order_obj ); 

Parameters (2)

0. $sub_obj
The sub obj.
1. $order_obj
The order obj.

Usage

  1. if ( !function_exists( 'wpc_sub_created' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-putler-connector/woocommerce-putler-connector.php'; 
  3.  
  4. // The sub obj. 
  5. $sub_obj = null; 
  6.  
  7. // The order obj. 
  8. $order_obj = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = wpc_sub_created($sub_obj, $order_obj); 
  12.  

Defined (1)

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

/woocommerce-putler-connector.php  
  1. function wpc_sub_created( $sub_obj, $order_obj ) { 
  2.  
  3. $sub_obj->post->post_status = 'wc-created'; 
  4.  
  5. wpc_init(); 
  6. if (method_exists($GLOBALS[putler_connector], 'post_order') ) { 
  7. $GLOBALS[putler_connector]->post_order( array('sub_id' => $sub_obj->id,  
  8. 'sub_details' => $sub_obj->post) );