process_product_meta_sitemap_tab

Function to save sitemap tab fields since version 1.0.0.

Description

process_product_meta_sitemap_tab( $post_id ); 

Parameters (1)

0. $post_id
The post id.

Usage

  1. if ( !function_exists( 'process_product_meta_sitemap_tab' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-category-based-sitemaps/includes/wccs-functions.php'; 
  3.  
  4. // The post id. 
  5. $post_id = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = process_product_meta_sitemap_tab($post_id); 
  9.  

Defined (1)

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

/includes/wccs-functions.php  
  1. function process_product_meta_sitemap_tab($post_id) { 
  2. update_post_meta( $post_id, '_sitemapexclude', ( isset($_POST['_sitemapexclude']) && $_POST['_sitemapexclude'] ) ? 'yes' : 'no' ); 
  3. update_post_meta( $post_id, '_sitemapchange', $_POST['_sitemapchange']); 
  4. update_post_meta( $post_id, '_sitemappriority', $_POST['_sitemappriority']);