Untitled

 avatar
unknown
plain_text
2 years ago
558 B
3
Indexable
function clear_b2bwhs_caches(){
	update_option( 'b2bwhs_first_time_rules_database', 'yes' );
	update_option( 'b2bwhs_dynamic_rules_have_changed', 'yes' );
	// delete all b2bwhs transients
	global $wpdb;
	$plugin_options = $wpdb->get_results( "SELECT option_name FROM $wpdb->options WHERE option_name LIKE '%transient_b2bwhs%'" );
	foreach ( $plugin_options as $option ) {
		delete_option( $option->option_name );
	}
	require_once B2BWHS_DIR . '/admin/class-b2bwhs-admin.php';
	$admin = new B2bwhs_Admin();
	$admin->b2bwhs_calculate_rule_numbers_database();
}
Editor is loading...