Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Taxonomy/Term and Role based Discounts for WooCommerce actions
<?php
add_action( 'tdw_rule_add', function( $id_term, $taxonomy, $data ) {
//Do whatever you want with $id_term, $taxonomy and $data
}, 10, 3 );
add_action( 'tdw_rule_edit', function( $id_term, $taxonomy, $data, $old_data ) {
//Do whatever you want with $id_term, $taxonomy, $data and $old_data
}, 10, 4 );
add_action( 'tdw_rule_delete', function( $id_term, $taxonomy, $data ) {
//Do whatever you want with $id_term, $taxonomy and $data
}, 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.