From d69cf172dbd6f7ae92615d5c5012a6b8c86bd3d1 Mon Sep 17 00:00:00 2001 From: Bogdan Arizancu Date: Wed, 22 Apr 2020 14:53:31 +0200 Subject: [PATCH] fixup! Allows avoiding performance bottlenecks caused by get_available_variation(). --- includes/class-wc-product-variable.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/class-wc-product-variable.php b/includes/class-wc-product-variable.php index d0073b0aabf..8f41725e151 100644 --- a/includes/class-wc-product-variable.php +++ b/includes/class-wc-product-variable.php @@ -282,10 +282,10 @@ class WC_Product_Variable extends WC_Product { /** * Get an array of available variations for the current product. * - * @param bool $render_variations Allows avoiding performance bottlenecks caused by get_available_variation(). + * @param bool $render_variations Prepares a data array for each variant for output in the add to cart form. Pass `false` to only return the available variations as objects. * @return array */ - public function get_available_variations($render_variations = true) { + public function get_available_variations( $render_variations = true ) { $variation_ids = $this->get_children(); $available_variations = array();