Skip to content

Instantly share code, notes, and snippets.

@helgatheviking
Last active June 25, 2018 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save helgatheviking/2316705f642414278723380de46be361 to your computer and use it in GitHub Desktop.
Save helgatheviking/2316705f642414278723380de46be361 to your computer and use it in GitHub Desktop.
Display description on each child product in a Mix and Match container
<?php
/**
* Display individual MNM option descriptions
*
* @param obj $mnm_item WC_Product of child item
* @param obj WC_Mix_and_Match $product the parent container
*/
function kia_add_individual_info( $mnm_item, $parent_product ) {
echo '<p class="desc">' . $mnm_item->get_short_description() . '</p>';
}
add_action( 'woocommerce_mnm_child_item_details', 'kia_add_individual_info', 65, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment