Prevent a possible logic problem in the Sku with shipsSeparately and isShippingRequired.

This commit is contained in:
Colin Kuskie 2009-05-06 22:55:28 +00:00
parent efd20f86a4
commit 1fb9c4877b

View file

@ -637,11 +637,14 @@ sub setTaxConfiguration {
=head2 shipsSeparately
Returns a boolean indicating whether this item must be shipped separately from other items.
If the shipsSeparately property is true, but isShippingRequired is false, this will return
false.
=cut
sub shipsSeparately {
return shift->get('shipsSeparately');
my ($self) = @_;
return $self->isShippingRequired && $self->get('shipsSeparately');
}