Last active
June 25, 2018 17:16
-
-
Save helgatheviking/5fa546c2438c7701dc49534ff08e6fbb to your computer and use it in GitHub Desktop.
Display individual MNM option prices
This file contains 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 | |
/** | |
* Display individual MNM option prices | |
* | |
* @param obj $mnm_item WC_Product of child item | |
* @param obj WC_Mix_and_Match $product the parent container | |
*/ | |
function kia_add_individual_prices( $mnm_item, $parent_product ) { | |
if( $parent_product->is_priced_per_product() ) { | |
echo '<p class="price">' . $mnm_item->get_price_html() . '</p>'; | |
} | |
} | |
add_action( 'woocommerce_mnm_child_item_details', 'kia_add_individual_prices', 65, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment