Can I create a tax query to return posts that match two slugs from same taxonomy

What I’m trying to achieve:

I have a taxonomy ‘module_data’ which is hierarchical. What I want is to use a tax query to get all posts that match a slug in an array of slugs for terms AND also match a second slug in a different array for the same taxonomy

Here’s what I tried:

        $taxQuery = 
                    array (
                        'relation' => 'AND',
                        array(
                            'taxonomy' => 'regulation_country',
                            'field' => 'slug',
                            'terms' => $regulation_country,
                        ),  
                        array(
                            'taxonomy' => 'module_data',
                            'field' => 'slug',
                            'terms' => $module_type,
                        ),
                        array(
                            'taxonomy' => 'module_data',
                            'field' => 'slug',
                            'terms' => $test_type,
                        )
);

Where $module_type and $test_type are both arrays of slugs in the module_data category. This returns nothing.

Here’s what works:

                $taxQuery = 
                            array (
                                'relation' => 'AND',
                                array(
                                    'taxonomy' => 'regulation_country',
                                    'field' => 'slug',
                                    'terms' => $regulation_country,
                                ),  
                                array(
                                    'taxonomy' => 'module_data',
                                    'field' => 'slug',
                                    'terms' => $module_type,
                                )
);

(where $module_type can be swapped out for $test_type and it returns either the module data matches or test_type matches respectively) but obviously this will only give me the results unconstrained by whether they match the slugs in the not included array.

Am I able to achieve what I want? to get all the regulations that match any combination of slugs from both arrays. (So where a regulation matches at least one from module_data and at least one from test_type)?

For posterity here’s where the tax query gets used in get_posts:

    $resultCountries = get_posts(
        array(
            'posts_per_page' => -1,
            'post_type' => 'regulation',
            'tax_query' => $taxQuery,
            'orderby'     => 'post_title',
            'order'   => 'ASC',
        )
    );

air travel – How to get airport tax refund of unused flight with Wizzair 2 years ago?

The only way to get the airport tax refunded on Wizz, is for flights departing or arriving in Germany. Again, you can’t or they’ll just ignore you.

I’ve used a website from Germany specialised in this (google it: Geld fuer Flug). It takes just 2min to fill in the request, and they will get back to you if it’s successfull or not (1-2days from personal experience). They don’t specially exactley (they’ll take their comission from the tax, around 20-30% probably).

The only downside that they don’t specify on their FAQ, even though you sign that you agree with their terms from you mobile (when accepting the offer they make you), they still need to send you the papers for you to sign (transfering the ownership of the airfare tickets from from you to them). And they only send those papers in Germany, Austria or Switzerland (they provide for envelops, stamps all the thing required to send them back). So if you’re living there, or have someone living there, they can assist you with this 😉

You can go back for the last 3 years to ask for the refund.

magento2 – Magento 2 Rounding Tax Calculation Issue

I use Magento 2.3.5p1 with catalog prices without tax. I have issue with tax rounding on storefront.
Example calculation.

I get following result on Magento storefront for 21% vat;

45.45 * 1.21 = 54.99

But it must be €55.00 (imported order from feedmanager). I don’t know where i make a mistake.

Reseller Club Sales Tax Collection – Is this fraud or a scam?

on 7/20 I received this mailing from Reseller Club:

"We would like to inform you that from July 30, 2020, we will be charging Sales Tax o… | Read the rest of https://www.webhostingtalk.com/showthread.php?t=1816439&goto=newpost

About me – Spin tax help me?

Hello friends, I have recently acquired GSA and I wanted to know if anyone can help me to make a spintax “about me” or if you can share the file with me, since I am new and do not understand much about how to do it.
Thank you very much.

checkout – Magento 2 Issue with Minicart product price when price is set Including tax

issue : Minicart is showing price excluding Taxes even if it is set in backend to show product price including taxes

backend Settings : Product price is set to show including taxes : it is working fine on products listing , details pages , check out and cart pages except mini cart

enter image description here

I tried to debug knockout response even there i can not find option to show pricing including taxes, how can i show price in minicart with taxes

enter image description here

magento2 – How to add extra amount to individual tax total?

I have two tax rules in my online show.

  1. Tax 1

  2. Tax 2

The tax calculation is based on the subtotal. But now I want to add custom amount with the above tax .

Ie, Tax 1 = Tax 1 + custom amount
Tax 2 = Tax 2 + custom amount.

enter image description here

Where I need to change the logic inorder to achieve this ?

Any help is really appreciated.

Thank you

Removing Tax Computation and Tax Labels on a condition

When the company tax status is tax exempt

I want this to happen.
In the cart and checkout pages, and invoices:

  • Remove the “incl. tax” items from the totals.
  • Remove the “excl. tax” tags on remaining totals.
  • Do not calculate tax on shipping cost.
  • Do not calculate tax in order total.

enter image description here

Any help would be appreciated..

taxes – Asking for tourist tax to be left cash in the accommodation

Travelled in several places in Italy, reservation made either with booking.com or airbnb and the hosts asked us to leave the tourist tax in the apartment before we check out. It’s small, usually 5-10 euros.

But to me this seems like tax evasion and first time I refused to do it and got a very negative review on airbnb. Say you are on a business trip, isn’t it a rule that you should get receipt for everything? how are you going to reimburse that tourist tax?

How should I deal with the situation fairly for both. I don’t want the host to feel cheated, but I also want my invoice so that I feel good that taxes are being paid and not being pocketed by the host?

php – Can’t reset tax query using ajax sorting plugin?

I have created an ajax sorting feature that filters a custom post type “Music” and its all separated by Genres and Tags.. the sorting works fine until.. I deselect all options. I’ve tried to add “all” as the default and added in the JS that if the genre is “all” to include all the posts. Every thing else works as desired but I need to be able to reset the tax query or include all.

Here is that javascript:

jQuery(document).ready(function($){  
        
    var bgenre = $(":checkbox(name=bgenre)");
    var btags = $(":checkbox(name=btags)");
    
    jQuery.merge( bgenre, btags ).on( "change", function() {
        
    var genre;
    var tags;       
    var genrearray = ();
        var tagsarray = ();
        
        
        $(":checkbox(name=bgenre):checked").each(function() { 
            genrearray.push($(this).val());
            
            //genre = genrearray.join();    
            genre = genrearray;         
        });        
        
        $(":checkbox(name=btags):checked").each(function() { 
            tagsarray.push($(this).val()); 
            tags = tagsarray.join();            
        });         
    //  var tags = tagsarray.join();
    
    if (genrearray.length < 1) {
        genre = 'all';
    }

        data = {
            'action': 'filterlist',
            'genre': genre,
            'tags': tags
            
        };
 
        $.ajax({
            url : ajaxurl,
            data : data,
            type : 'POST',
            beforeSend : function ( xhr ) {

                $('.bplaylist').html( 'Loading...' );
                $('.js-Genre').attr( 'disabled', 'disabled' );
                
            },
            success : function( data ) {
                if ( data ) {                                   
                    $('.bplaylist').html( data.posts );
 
                    $('.js-Genre').removeAttr('disabled');
                    $( '.js-Tags' ).removeAttr('disabled');
                    
                } else {
                    $('.bplaylist').html( 'No posts found.' );
                }
            }
        });
    })
    });

and here is the php

function ajax_filterlist_handler() {           
           //$tags = esc_attr( $_POST('tags') );
           $genre = $_POST('genre'); 
           $tags = $_POST('tags');             
        

        $args = array(
            'post_type' => 'download',
            'post_status' => 'publish',
            'posts_per_page' => -1,
            'orderby' => 'date',
            'order' => 'DESC',
            'tax_query' => array(),
            'relation' => IN
        );
            


        if ( isset( $_POST('genre')) && $_POST('genre') !== 'all'   ) {
        $args('tax_query')() = array(
            'taxonomy' => 'genre',
            'field' => 'slug',
            'terms' => $genre
         ); }

         if ( isset( $_POST('genre')) && $_POST('genre') === 'all'   ) {
         $args('tax_query')() = array(
            'taxonomy' => 'genre'         
                  
            );
       
         }
    if ( !isset( $_POST('genre')) ) {
         $args('tax_query')() = array( 
            );
       
         }
   
         
         if( isset( $_POST('tags') ) ) {
        $args('tax_query')() = array(
            'taxonomy' => 'download_tag',
            'field' => 'slug',
            'terms' => $tags
        );
    }
      

        $posts = 'No Posts Available';

        $the_query = new WP_Query( $args );
     
        if ( $the_query->have_posts() ) :
            ob_start();

            while ( $the_query->have_posts() ) : $the_query->the_post();
            get_template_part( '/custom/template-parts/trackitem' );
            endwhile;

            $posts = ob_get_clean();
        endif;

        $return = array(
            'posts' => $posts
        );

        wp_send_json($return);
    }
    add_action( 'wp_ajax_filterlist', 'ajax_filterlist_handler' );
    add_action( 'wp_ajax_nopriv_filterlist', 'ajax_filterlist_handler' );   

Sorry if the code is jumbled mess at this point. I was following a tutorial and after I got it working. I kinda went on my own to try to figure out the reset and/or all option.