• Resolved phoenixMagoo

    (@phoenixmagoo)


    Hey, it looks like the Zero Rate Tax class option at the product level is not working anymore. State tax is being applied in the cart no matter what.

    Please advise on a solution.

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    Just did a test; setting to zero class removed my taxes since I have no zero rate taxes defined.

    Check your tax rate tables again?

    Thread Starter phoenixMagoo

    (@phoenixmagoo)

    Hmmmm. Here is a screenshot of the zero rate tax table: https://www.dropbox.com/s/ra8oson6dtltaf9/Screenshot%202017-04-05%2011.42.38.png?dl=0

    Here is a screenshot of the product edit area for taxes:
    https://www.dropbox.com/s/zoay4f1cxdxijsi/Screenshot%202017-04-05%2011.43.36.png?dl=0

    If anything is off, please let me know! But it was working 100% as expected before the 3.0 release.

    Thanks!

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    I notice this is variable. What are the tax classes for the VARIATIONS?

    Thread Starter phoenixMagoo

    (@phoenixmagoo)

    Oh wow…it looks like at the variation level all the Tax Classes went from “Same as Parent” to “Standard”. That explains the unwanted taxing. Anyway to tell Woocommerce to ignore the Tax class at the variation level and just go with the parent tax class?

    Thread Starter phoenixMagoo

    (@phoenixmagoo)

    I was able to remedy the situation by altering the following lines of code in the class-wc-product-variation.php file from the following:

    /**
    	 * Returns the tax class.
    	 *
    	 * @param  string $context
    	 * @return string
    	 */
    	public function get_tax_class( $context = 'view' ) {
    		$value = $this->get_prop( 'tax_class', $context );
    
    		// Inherit value from parent.
    		if ( 'view' === $context && 'parent' === $value ) {
    			$value = $this->parent_data['tax_class'];
    		}
    		return $value;
    	}

    to:

    /**
    	 * Returns the tax class.
    	 *
    	 * @param  string $context
    	 * @return string
    	 */
    	public function get_tax_class( $context = 'view' ) {
    		$value = $this->get_prop( 'tax_class', $context );
    
    		// Inherit value from parent.
    		//if ( 'view' === $context && 'parent' === $value ) {
    			$value = $this->parent_data['tax_class'];
    		//}
    		return $value;
    	}

    I know it’s a horrible idea to modify core files. Is there a proper filter or action to modify the function above without messing with the plugin files.

    -Will

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    You could update the meta data in bulk using SQL maybe? Set the values to parent for your variations.

    Thread Starter phoenixMagoo

    (@phoenixmagoo)

    Ah. Sounds like the right plan. Thanks for the conversation!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Zero Rate Tax Selected at the Product Level is Not Working after the 3.0 Update’ is closed to new replies.