Merge pull request #25093 from JoryHogeveen/patch-1

Before and after product list hooks
This commit is contained in:
Rodrigo Primo 2019-12-13 16:28:45 -03:00 committed by GitHub
commit eefab9d672
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -33,6 +33,8 @@ do_action( 'woocommerce_before_add_to_cart_form' ); ?>
'price',
), $product );
do_action( 'woocommerce_grouped_product_list_before', $grouped_product_columns, $quantites_required, $product );
foreach ( $grouped_products as $grouped_product_child ) {
$post_object = get_post( $grouped_product_child->get_id() );
$quantites_required = $quantites_required || ( $grouped_product_child->is_purchasable() && ! $grouped_product_child->has_options() );
@ -90,6 +92,8 @@ do_action( 'woocommerce_before_add_to_cart_form' ); ?>
}
$post = $previous_post; // WPCS: override ok.
setup_postdata( $post );
do_action( 'woocommerce_grouped_product_list_after', $grouped_product_columns, $quantites_required, $product );
?>
</tbody>
</table>