Changeset 3346212
- Timestamp:
- 08/18/2025 08:10:35 AM (8 months ago)
- Location:
- buildecom/trunk
- Files:
-
- 3 edited
-
api.php (modified) (1 diff)
-
buildecom.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
buildecom/trunk/api.php
r3345590 r3346212 266 266 267 267 } 268 } 269 270 if ($product->is_type('grouped')) { 271 $children_ids = $product->get_children(); 272 $min_price = null; 273 $max_price = null; 274 275 foreach ($children_ids as $child_id) { 276 $child = wc_get_product($child_id); 277 if (!$child) { 278 continue; 279 } 280 281 if ($child->is_type('variable')) { 282 $child_min = $child->get_variation_price(); // min 283 $child_max = $child->get_variation_price('max'); // max 284 } else { 285 $child_min = $child->get_price(); 286 $child_max = $child_min; 287 } 288 289 if ($child_min === '' && $child_max === '') { 290 continue; 291 } 292 293 if ($child_min !== '') { 294 $child_min = wc_get_price_to_display($child, ['price' => (float) $child_min]); 295 } 296 if ($child_max !== '') { 297 $child_max = wc_get_price_to_display($child, ['price' => (float) $child_max]); 298 } 299 300 if ($child_min !== '' && ($min_price === null || $child_min < $min_price)) { 301 $min_price = $child_min; 302 } 303 if ($child_max !== '' && ($max_price === null || $child_max > $max_price)) { 304 $max_price = $child_max; 305 } 306 } 307 308 $response->data['min_price'] = ($min_price !== null) ? strval($min_price) : '0'; 309 $response->data['max_price'] = ($max_price !== null) ? strval($max_price) : '0'; 310 $response->data['price'] = $response->data['min_price']; 268 311 } 269 312 -
buildecom/trunk/buildecom.php
r3346129 r3346212 8 8 * Plugin URI: https://buildecom.app/wp-plugin/ 9 9 * Description: The official WordPress plugin for BuildEcom. Build eCommerce mobile application through woocommerce and wordpress 10 * Version: 1.1. 110 * Version: 1.1.2 11 11 * Author: BuildEcom 12 12 * Author URI: https://buildecom.app -
buildecom/trunk/readme.txt
r3346129 r3346212 4 4 Requires at least: 4.7 5 5 Tested up to: 6.8 6 Stable tag: 1.1. 16 Stable tag: 1.1.2 7 7 License: GPL-2.0+ 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.