Skip to content

Commit

Permalink
Product Bundles fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Spreeuw committed Mar 28, 2017
1 parent 464ddcb commit d760ccb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions includes/class-wcpdf-export.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function __construct() {
}

// WooCommerce Product Bundles compatibility (add row classes)
if ( !class_exists('WC_Bundles') ) {
if ( class_exists('WC_Bundles') ) {
add_filter( 'wpo_wcpdf_item_row_class', array( $this, 'add_product_bundles_classes' ), 10, 4 );
}

Expand Down Expand Up @@ -1181,8 +1181,6 @@ public function add_product_bundles_classes ( $classes, $template_type, $order,
}
}

$bundled_by = WCX_Order::get_item_meta( $order, $item_id, '_bundled_by', true );

if ( $bundled_by = WCX_Order::get_item_meta( $order, $item_id, '_bundled_by', true ) ) {
$classes = $classes . ' bundled-item';

Expand All @@ -1192,7 +1190,7 @@ public function add_product_bundles_classes ( $classes, $template_type, $order,
}

return $classes;
} elseif ( $bundled_by = WCX_Order::get_item_meta( $order, $item_id, '_bundled_items', true ) ) {
} elseif ( $bundled_items = WCX_Order::get_item_meta( $order, $item_id, '_bundled_items', true ) ) {
return $classes . ' product-bundle';
}

Expand Down

0 comments on commit d760ccb

Please sign in to comment.