Last active
July 9, 2024 03:51
-
-
Save webtoffee-git/29664d2082981d65d38cfd30c05723fb to your computer and use it in GitHub Desktop.
Code to delete products from the site - By WebToffee( Product Import and Export plugin)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //Do not copy this line of code | |
function wt_ier_delete_existing_product_in_certain_category($query_args) | |
{ | |
$query_args['tax_query'][] = array( | |
'taxonomy' => 'product_cat', | |
'field' => 'slug', | |
'terms' => array('category1', 'category2', 'category3') | |
); | |
return $query_args; | |
} | |
add_filter('wt_ier_product_importer_pre_delete_existing_query_args', 'wt_ier_delete_existing_product_in_certain_category', 11); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment