Hiding taxonomies with no children WP_Query & tax_query

UPDATE! OK!!! Woooohooo! Found out what it was.. I should have been calling if have posts before the call for $tax->name; Here is my final, and working code! 🙂 <?php /**********************************************/ // CUSTOM WINE MENU SHORTCODE /**********************************************/ add_shortcode( ‘wine_list_per_cat’, ‘wine_list_per_cat’ ); function wine_list_per_cat($atts){ global $woocommerce_loop; extract(shortcode_atts(array( ‘cat’ => ”, // list of categories in the … Read more

Add sku to product url woocommerce [closed]

looks like this will do what you want just write out a custom function for it: Custom field values in permalink something like this: as the link says: function jpb_custom_meta_permalink( $link, $post ){ $post_meta = get_post_meta( $post->ID, ‘<insert your meta key here>’, true ); if( empty( $post_meta ) || !is_string( $post_meta ) ) $post_meta=”<insert your … Read more

Woocommerce: how to know if the customer is canceled the order or the shop owner? [closed]

Would the owner really be ordering/cancelling oders that often? If not just trigger the notification on every cancellation. You could add a check against current user info and so long as its not the owners id – send the notification. Maybe start with this: wp_get_current_user() Or use: global $current_user; Directly. It should not be too … Read more