pmpro_delete_category

The Paid Memberships Pro pmpro delete category function.

Description

pmpro_delete_category( (constant) $cat_id = NULL ); 

Parameters (1)

0. $cat_id — Optional. (constant) => NULL
The cat id.

Usage

  1. if ( !function_exists( 'pmpro_delete_category' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'paid-memberships-pro/includes/cleanup.php'; 
  3.  
  4. // The cat id. 
  5. $cat_id = NULL; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = pmpro_delete_category($cat_id); 
  9.  

Defined (1)

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

/includes/cleanup.php  
  1. function pmpro_delete_category($cat_id = NULL) 
  2. global $wpdb; 
  3. $sqlQuery = "DELETE FROM $wpdb->pmpro_memberships_categories WHERE category_id = '" . $cat_id . "'"; 
  4. $wpdb->query($sqlQuery);