wccs_update_sitemap_with_post

This function automattically updates sitemap whenever product is updated since version 1.0.0.

Defined (1)

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

/includes/wccs-update-sitemap-with-post.php  
  1. class wccs_update_sitemap_with_post { 
  2. public function __construct() { 
  3. global $wccs_options; 
  4. if ((isset($wccs_options['autoupdate'])) && ($wccs_options['autoupdate'] == "on") ) { 
  5.  
  6.  
  7. add_action('publish_product', 'wccs_generate_sitemap_function'); 
  8.  
  9.  
  10.  
  11.  
  12. if ( (isset($wccs_options['autoping'])) && ($wccs_options['autoping'] == "on") ) { 
  13.  
  14.  
  15.  
  16. add_action('new_to_publish', 'wccs_ping_sitemap_with_product_update'); 
  17. add_action('draft_to_publish', 'wccs_ping_sitemap_with_product_update'); 
  18. add_action('pending_to_publish', 'wccs_ping_sitemap_with_product_update'); 
  19.  
  20.