Created
October 20, 2015 06:33
-
-
Save tamarazuk/aa17e1730cf446639636 to your computer and use it in GitHub Desktop.
WooCommerce Multilingual - Compatability with PDF Product Vouchers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //only copy this line if needed | |
// WPML WooCommerce Multilingual compatability with PDF Product Vouchers | |
function sv_wc_pdf_product_vouchers_wc_multilingual_duplicate_exception( $exclude, $cart_item ) { | |
if ( isset( $cart_item[ 'voucher_id' ] ) ) { | |
$exclude = true; | |
} | |
return $exclude; | |
} | |
add_filter( 'wcml_exception_duplicate_products_in_cart', 'sv_wc_pdf_product_vouchers_wc_multilingual_duplicate_exception', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment