wpc_update_sub_meta

The WooCommerce Putler Connector wpc update sub meta function.

Description

wpc_update_sub_meta( $sub_id, $post ); 

Parameters (2)

0. $sub_id
The sub id.
1. $post
The post.

Usage

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

Defined (1)

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

/woocommerce-putler-connector.php  
  1. function wpc_update_sub_meta( $sub_id, $post ) { 
  2.  
  3. $post->post_status = (!empty($sub_id)) ? get_post_status($sub_id) : $post->post_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. 'sub_details' => $post) );