/
home
/
suroeste
/
public_html
/
wp-content
/
plugins
/
woocommerce
/
includes
/
/home/suroeste/public_html/wp-content/plugins/woocommerce/includes
mkdir
upload
Name
Size
Mode
Actions
abstracts/
-
0755
rm
admin/
-
0755
rm
blocks/
-
0755
rm
cli/
-
0755
rm
customizer/
-
0755
rm
data-stores/
-
0755
rm
emails/
-
0755
rm
export/
-
0755
rm
gateways/
-
0755
rm
import/
-
0755
rm
integrations/
-
0755
rm
interfaces/
-
0755
rm
legacy/
-
0755
rm
libraries/
-
0755
rm
log-handlers/
-
0755
rm
payment-tokens/
-
0755
rm
queue/
-
0755
rm
react-admin/
-
0755
rm
rest-api/
-
0755
rm
shipping/
-
0755
rm
shortcodes/
-
0755
rm
theme-support/
-
0755
rm
tracks/
-
0755
rm
traits/
-
0755
rm
walkers/
-
0755
rm
wccom-site/
-
0755
rm
widgets/
-
0755
rm
class-wc-ajax.php
117395
0644
edit
dl
rm
class-wc-auth.php
12962
0644
edit
dl
rm
class-wc-autoloader.php
3209
0644
edit
dl
rm
class-wc-background-emailer.php
4685
0644
edit
dl
rm
class-wc-background-updater.php
3535
0644
edit
dl
rm
class-wc-breadcrumb.php
9722
0644
edit
dl
rm
class-wc-cache-helper.php
11047
0644
edit
dl
rm
class-wc-cart-fees.php
3448
0644
edit
dl
rm
class-wc-cart-session.php
18235
0644
edit
dl
rm
class-wc-cart-totals.php
28927
0644
edit
dl
rm
class-wc-cart.php
67902
0644
edit
dl
rm
class-wc-checkout.php
48053
0644
edit
dl
rm
class-wc-cli.php
1733
0644
edit
dl
rm
class-wc-comments.php
16241
0644
edit
dl
rm
class-wc-countries.php
50095
0644
edit
dl
rm
class-wc-coupon.php
38770
0644
edit
dl
rm
class-wc-customer-download-log.php
3452
0644
edit
dl
rm
class-wc-customer-download.php
10702
0644
edit
dl
rm
class-wc-customer.php
30390
0644
edit
dl
rm
class-wc-data-exception.php
1321
0644
edit
dl
rm
class-wc-data-store.php
6752
0644
edit
dl
rm
class-wc-datetime.php
2310
0644
edit
dl
rm
class-wc-deprecated-action-hooks.php
6746
0644
edit
dl
rm
class-wc-deprecated-filter-hooks.php
7518
0644
edit
dl
rm
class-wc-discounts.php
35910
0644
edit
dl
rm
class-wc-download-handler.php
26080
0644
edit
dl
rm
class-wc-emails.php
25696
0644
edit
dl
rm
class-wc-embed.php
4284
0644
edit
dl
rm
class-wc-form-handler.php
45810
0644
edit
dl
rm
class-wc-frontend-scripts.php
27393
0644
edit
dl
rm
class-wc-geo-ip.php
31136
0644
edit
dl
rm
class-wc-geolite-integration.php
2036
0644
edit
dl
rm
class-wc-geolocation.php
10693
0644
edit
dl
rm
class-wc-https.php
4439
0644
edit
dl
rm
class-wc-install.php
102314
0644
edit
dl
rm
class-wc-integrations.php
1308
0644
edit
dl
rm
class-wc-log-levels.php
3992
0644
edit
dl
rm
class-wc-logger.php
9482
0644
edit
dl
rm
class-wc-meta-data.php
2260
0644
edit
dl
rm
class-wc-order-factory.php
8728
0644
edit
dl
rm
class-wc-order-item-coupon.php
4175
0644
edit
dl
rm
class-wc-order-item-fee.php
9058
0644
edit
dl
rm
class-wc-order-item-meta.php
5942
0644
edit
dl
rm
class-wc-order-item-product.php
14027
0644
edit
dl
rm
class-wc-order-item-shipping.php
8043
0644
edit
dl
rm
class-wc-order-item-tax.php
6644
0644
edit
dl
rm
class-wc-order-item.php
11928
0644
edit
dl
rm
class-wc-order-query.php
2615
0644
edit
dl
rm
class-wc-order-refund.php
5762
0644
edit
dl
rm
class-wc-order.php
70945
0644
edit
dl
rm
class-wc-payment-gateways.php
11632
0644
edit
dl
rm
class-wc-payment-tokens.php
6390
0644
edit
dl
rm
class-wc-post-data.php
20973
0644
edit
dl
rm
class-wc-post-types.php
28820
0644
edit
dl
rm
class-wc-privacy-background-process.php
1707
0644
edit
dl
rm
class-wc-privacy-erasers.php
13938
0644
edit
dl
rm
class-wc-privacy-exporters.php
15044
0644
edit
dl
rm
class-wc-privacy.php
16205
0644
edit
dl
rm
class-wc-product-attribute.php
7137
0644
edit
dl
rm
class-wc-product-download.php
12547
0644
edit
dl
rm
class-wc-product-external.php
4955
0644
edit
dl
rm
class-wc-product-factory.php
3665
0644
edit
dl
rm
class-wc-product-grouped.php
5349
0644
edit
dl
rm
class-wc-product-query.php
2231
0644
edit
dl
rm
class-wc-product-simple.php
1934
0644
edit
dl
rm
class-wc-product-variable.php
22605
0644
edit
dl
rm
class-wc-product-variation.php
17271
0644
edit
dl
rm
class-wc-query.php
33385
0644
edit
dl
rm
class-wc-rate-limiter.php
4100
0644
edit
dl
rm
class-wc-regenerate-images-request.php
7923
0644
edit
dl
rm
class-wc-regenerate-images.php
15567
0644
edit
dl
rm
class-wc-register-wp-admin-settings.php
5171
0644
edit
dl
rm
class-wc-rest-authentication.php
20448
0644
edit
dl
rm
class-wc-rest-exception.php
276
0644
edit
dl
rm
class-wc-session-handler.php
15387
0644
edit
dl
rm
class-wc-shipping-rate.php
5638
0644
edit
dl
rm
class-wc-shipping-zone.php
13392
0644
edit
dl
rm
class-wc-shipping-zones.php
4106
0644
edit
dl
rm
class-wc-shipping.php
11846
0644
edit
dl
rm
class-wc-shortcodes.php
19116
0644
edit
dl
rm
class-wc-structured-data.php
19172
0644
edit
dl
rm
class-wc-tax.php
37969
0644
edit
dl
rm
class-wc-template-loader.php
21908
0644
edit
dl
rm
class-wc-tracker.php
37965
0644
edit
dl
rm
class-wc-validation.php
5929
0644
edit
dl
rm
class-wc-webhook.php
29946
0644
edit
dl
rm
class-woocommerce.php
42729
0644
edit
dl
rm
wc-account-functions.php
13205
0644
edit
dl
rm
wc-attribute-functions.php
21102
0644
edit
dl
rm
wc-cart-functions.php
19380
0644
edit
dl
rm
wc-conditional-functions.php
14252
0644
edit
dl
rm
wc-core-functions.php
81757
0644
edit
dl
rm
wc-coupon-functions.php
2819
0644
edit
dl
rm
wc-deprecated-functions.php
34902
0644
edit
dl
rm
wc-formatting-functions.php
46589
0644
edit
dl
rm
wc-notice-functions.php
8212
0644
edit
dl
rm
wc-order-functions.php
38351
0644
edit
dl
rm
wc-order-item-functions.php
5153
0644
edit
dl
rm
wc-page-functions.php
7099
0644
edit
dl
rm
wc-product-functions.php
52020
0644
edit
dl
rm
wc-rest-functions.php
11460
0644
edit
dl
rm
wc-stock-functions.php
13866
0644
edit
dl
rm
wc-template-functions.php
123892
0644
edit
dl
rm
wc-template-hooks.php
12859
0644
edit
dl
rm
wc-term-functions.php
21155
0644
edit
dl
rm
wc-update-functions.php
84655
0644
edit
dl
rm
wc-user-functions.php
29247
0644
edit
dl
rm
wc-webhook-functions.php
5855
0644
edit
dl
rm
wc-widget-functions.php
2063
0644
edit
dl
rm
Edit:
/home/suroeste/public_html/wp-content/plugins/woocommerce/includes/class-wc-product-grouped.php
(5349B)
<?php /** * Grouped Product * * Grouped products cannot be purchased - they are wrappers for other products. * * @package WooCommerce\Classes\Products * @version 3.0.0 */ defined( 'ABSPATH' ) || exit; /** * Product grouped class. */ class WC_Product_Grouped extends WC_Product { /** * Stores product data. * * @var array */ protected $extra_data = array( 'children' => array(), ); /** * Get internal type. * * @return string */ public function get_type() { return 'grouped'; } /** * Get the add to cart button text. * * @return string */ public function add_to_cart_text() { return apply_filters( 'woocommerce_product_add_to_cart_text', __( 'View products', 'woocommerce' ), $this ); } /** * Get the add to cart button text description - used in aria tags. * * @since 3.3.0 * @return string */ public function add_to_cart_description() { /* translators: %s: Product title */ return apply_filters( 'woocommerce_product_add_to_cart_description', sprintf( __( 'View products in the “%s” group', 'woocommerce' ), $this->get_name() ), $this ); } /** * Returns whether or not the product is on sale. * * @param string $context What the value is for. Valid values are view and edit. * @return bool */ public function is_on_sale( $context = 'view' ) { $children = array_filter( array_map( 'wc_get_product', $this->get_children( $context ) ), 'wc_products_array_filter_visible_grouped' ); $on_sale = false; foreach ( $children as $child ) { if ( $child->is_purchasable() && ! $child->has_child() && $child->is_on_sale() ) { $on_sale = true; break; } } return 'view' === $context ? apply_filters( 'woocommerce_product_is_on_sale', $on_sale, $this ) : $on_sale; } /** * Returns false if the product cannot be bought. * * @return bool */ public function is_purchasable() { return apply_filters( 'woocommerce_is_purchasable', false, $this ); } /** * Returns the price in html format. * * @param string $price (default: ''). * @return string */ public function get_price_html( $price = '' ) { $tax_display_mode = get_option( 'woocommerce_tax_display_shop' ); $child_prices = array(); $children = array_filter( array_map( 'wc_get_product', $this->get_children() ), 'wc_products_array_filter_visible_grouped' ); foreach ( $children as $child ) { if ( '' !== $child->get_price() ) { $child_prices[] = 'incl' === $tax_display_mode ? wc_get_price_including_tax( $child ) : wc_get_price_excluding_tax( $child ); } } if ( ! empty( $child_prices ) ) { $min_price = min( $child_prices ); $max_price = max( $child_prices ); } else { $min_price = ''; $max_price = ''; } if ( '' !== $min_price ) { if ( $min_price !== $max_price ) { $price = wc_format_price_range( $min_price, $max_price ); } else { $price = wc_price( $min_price ); } $is_free = 0 === $min_price && 0 === $max_price; if ( $is_free ) { $price = apply_filters( 'woocommerce_grouped_free_price_html', __( 'Free!', 'woocommerce' ), $this ); } else { $price = apply_filters( 'woocommerce_grouped_price_html', $price . $this->get_price_suffix(), $this, $child_prices ); } } else { $price = apply_filters( 'woocommerce_grouped_empty_price_html', '', $this ); } return apply_filters( 'woocommerce_get_price_html', $price, $this ); } /* |-------------------------------------------------------------------------- | Getters |-------------------------------------------------------------------------- | | Methods for getting data from the product object. */ /** * Return the children of this product. * * @param string $context What the value is for. Valid values are view and edit. * @return array */ public function get_children( $context = 'view' ) { return $this->get_prop( 'children', $context ); } /* |-------------------------------------------------------------------------- | Setters |-------------------------------------------------------------------------- | | Methods for getting data from the product object. */ /** * Return the children of this product. * * @param array $children List of product children. */ public function set_children( $children ) { $this->set_prop( 'children', array_filter( wp_parse_id_list( (array) $children ) ) ); } /* |-------------------------------------------------------------------------- | Sync with children. |-------------------------------------------------------------------------- */ /** * Sync a grouped product with it's children. These sync functions sync * upwards (from child to parent) when the variation is saved. * * @param WC_Product|int $product Product object or ID for which you wish to sync. * @param bool $save If true, the product object will be saved to the DB before returning it. * @return WC_Product Synced product object. */ public static function sync( $product, $save = true ) { if ( ! is_a( $product, 'WC_Product' ) ) { $product = wc_get_product( $product ); } if ( is_a( $product, 'WC_Product_Grouped' ) ) { $data_store = WC_Data_Store::load( 'product-' . $product->get_type() ); $data_store->sync_price( $product ); if ( $save ) { $product->save(); } } return $product; } }
Save
cmd:
run