Last active
October 20, 2015 01:45
-
-
Save tamarazuk/5079ae3b34cccc225540 to your computer and use it in GitHub Desktop.
WPML WooCommerce Multilingual compatability with Measurement Price Calculator
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 Measurement Price Calculator | |
function sv_wc_mpc_woocommerce_multilingual_duplicate_exception( $exclude, $cart_item ) { | |
if ( isset( $cart_item[ 'pricing_item_meta_data' ] ) ) { | |
$exclude = true; | |
} | |
return $exclude; | |
} | |
add_filter( 'wcml_exception_duplicate_products_in_cart', 'sv_wc_mpc_woocommerce_multilingual_duplicate_exception', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment