• Resolved Matej Podstrelenec

    (@matejpodstrelenec)


    Hi,

    first of all, thank you for a nice plugin.

    Problem I face is, that I see only the “standard” option in the Tax classes select.
    I have some tax classes defined and I can list them with WC_Tax::get_tax_classes() call.
    However I don’t see them in Tax classes option select in your plugin.

    Not sure if this is a problem of plugin itself or it is related to get_option( ‘woocommerce_tax_classes’ ) not working properly.

    Any idea what could be wrong here?

    Best regards,
    Matej

    Site address (URL): https://www.hesperion.cz
    WC Version: 3.9.2
    REST API Version: ? 1.0.7
    Log Directory Writable: ?
    WP Version: 5.4.1
    
    Server Info: Apache
    PHP Version: 7.3.1
    PHP Post Max Size: 128 MB
    PHP Time Limit: 90
    PHP Max Input Vars: 10000
    cURL Version: 7.19.7
    NSS/3.27.1
    
    ### Theme ###
    
    Name: Divi-child
    Version: 1
    Child Theme: ?
    Parent Theme Name: Divi
    Parent Theme Version: 4.4.6
    Parent Theme Author URL: https://www.elegantthemes.com
    WooCommerce Support: ?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Karolina Vyskocilova

    (@vyskoczilova)

    Hi Matej,

    thanks for reporting the bug. It looks like something has changed in last updates and the functionality broke down.

    Could you try to replace the function get_woocommerce_tax_classes() (the very last in inc/class-pay4pay.php) with the following lines?

    public function get_woocommerce_tax_classes() {
    	$tax_class_options = [];
    	$tax_classes = WC_Tax::get_tax_classes(); // Retrieve all tax classes.
    	$tax_class_options[''] = __( 'Standard', 'woocommerce' );
    	foreach ($tax_classes as $tax_class) {
    		$tax_class_options[$tax_class] = $tax_class;
    	}
    
    	return $tax_class_options;
    }

    If all is fine, I’ll release a new fixed version.

    Best regards,
    Karolina

    Thread Starter Matej Podstrelenec

    (@matejpodstrelenec)

    Hi Karolina,

    thank you for a quick answer. I have tested the proposed solution in the client environment and it seems to working well.

    Have a nice day.
    Matej

    Plugin Author Karolina Vyskocilova

    (@vyskoczilova)

    Perfect, I’ll polish it up (= I’ll try to find out where it broke down, or at least if it’s compatible with an older version of WooCommerce) and it will be part of the next update.

    Cheers,
    Karolina

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Only standard tax class visible’ is closed to new replies.