Skip to content

Instantly share code, notes, and snippets.

@krugazul
Last active July 9, 2018 14:37
Show Gist options
  • Select an option

  • Save krugazul/7ce542141e29305cb24c139c93b98726 to your computer and use it in GitHub Desktop.

Select an option

Save krugazul/7ce542141e29305cb24c139c93b98726 to your computer and use it in GitHub Desktop.
Bulk Delete WooCommerce and WooCommerce Subscriptions Integration
<?php
//Add the following function to line 683
$wc_post_types = array(
'wc-active',
'wc-switched',
'wc-expired',
'wc-pending-cancel',
'wc-pending',
'wc-processing',
'wc-on-hold',
'wc-completed',
'wc-cancelled',
'wc-refunded',
'wc-failed',
);
foreach ( $wc_post_types as $wc_post_type ) {
if ( $post_count->$wc_post_type > 0 ) {
$types_array["$type-$wc_post_type"] = $post_count->$wc_post_type;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment