Created
March 7, 2016 19:49
-
-
Save DustinHartzler/956fc1e63ff205048d69 to your computer and use it in GitHub Desktop.
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
add_filter( 'woocommerce_cart_item_price', 'wc_cp_empty_composited_item_cart_order_price', 100, 2 ); | |
add_filter( 'woocommerce_cart_item_subtotal', 'wc_cp_empty_composited_item_cart_order_price', 100, 2 ); | |
add_filter( 'woocommerce_checkout_item_subtotal', 'wc_cp_empty_composited_item_cart_order_price', 100, 2 ); | |
add_filter( 'woocommerce_order_formatted_line_subtotal', 'wc_cp_empty_composited_item_cart_order_price', 100, 2 ); | |
add_filter( 'woocommerce_composited_product_price_string', 'wc_cp_composited_product_empty_price_string', 100, 4 ); | |
add_filter( 'woocommerce_composited_item_price_html', 'wc_cp_woocommerce_composited_item_empty_price_html', 100, 4 ); | |
function wc_cp_woocommerce_composited_item_empty_price_html( $price_html, $product, $component_id, $composite_id ) { | |
$price_html = ''; | |
return $price_html; | |
} | |
function wc_cp_composited_product_empty_price_string( $price_string, $product_id, $component_id, $composited_product ) { | |
$price_string = ''; | |
return $price_string; | |
} | |
function wc_cp_empty_composited_item_cart_order_price( $price, $values ) { | |
if ( isset( $values[ 'composite_parent' ] ) ) { | |
$price = ''; | |
} | |
return $price; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment