Merge pull request #16762 from mikaelz/patch-1

Remove duplicate check
This commit is contained in:
Mike Jolley 2017-09-08 13:47:59 +01:00 committed by GitHub
commit 7a170a2ebf
1 changed files with 1 additions and 1 deletions

View File

@ -1300,7 +1300,7 @@ class WC_Order extends WC_Abstract_Order {
*/
public function has_downloadable_item() {
foreach ( $this->get_items() as $item ) {
if ( $item->is_type( 'line_item' ) && ( $product = $item->get_product() ) && $product->is_downloadable() && $product->has_file() ) {
if ( $item->is_type( 'line_item' ) && ( $product = $item->get_product() ) && $product->has_file() ) {
return true;
}
}