Skip to content

Instantly share code, notes, and snippets.

@szbl
Last active October 23, 2015 01:10
Show Gist options
  • Save szbl/981a1a7fa77d49999e7f to your computer and use it in GitHub Desktop.
Save szbl/981a1a7fa77d49999e7f to your computer and use it in GitHub Desktop.
<?php
// replace the foreach loop on line 132 with this version:
foreach ( $this->get_children() as $child_id ) {
if ( ! is_int( $child_id ) ) {
continue;
}
$sale_price = get_post_meta( $child_id, '_sale_price', true );
if ( $sale_price !== "" && $sale_price >= 0 ) {
$is_on_sale = true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment