/
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-attribute.php
(7137B)
<?php /** * Represents a product attribute * * Attributes can be global (taxonomy based) or local to the product itself. * Uses ArrayAccess to be BW compatible with previous ways of reading attributes. * * @package WooCommerce\Classes * @version 3.0.0 * @since 3.0.0 */ defined( 'ABSPATH' ) || exit; /** * Product attribute class. */ class WC_Product_Attribute implements ArrayAccess { /** * Data array. * * @since 3.0.0 * @var array */ protected $data = array( 'id' => 0, 'name' => '', 'options' => array(), 'position' => 0, 'visible' => false, 'variation' => false, ); /** * Return if this attribute is a taxonomy. * * @return boolean */ public function is_taxonomy() { return 0 < $this->get_id(); } /** * Get taxonomy name if applicable. * * @return string */ public function get_taxonomy() { return $this->is_taxonomy() ? $this->get_name() : ''; } /** * Get taxonomy object. * * @return array|null */ public function get_taxonomy_object() { global $wc_product_attributes; return $this->is_taxonomy() ? $wc_product_attributes[ $this->get_name() ] : null; } /** * Gets terms from the stored options. * * @return array|null */ public function get_terms() { if ( ! $this->is_taxonomy() || ! taxonomy_exists( $this->get_name() ) ) { return null; } $terms = array(); foreach ( $this->get_options() as $option ) { if ( is_int( $option ) ) { $term = get_term_by( 'id', $option, $this->get_name() ); } else { // Term names get escaped in WP. See sanitize_term_field. $term = get_term_by( 'name', $option, $this->get_name() ); if ( ! $term || is_wp_error( $term ) ) { $new_term = wp_insert_term( $option, $this->get_name() ); $term = is_wp_error( $new_term ) ? false : get_term_by( 'id', $new_term['term_id'], $this->get_name() ); } } if ( $term && ! is_wp_error( $term ) ) { $terms[] = $term; } } return $terms; } /** * Gets slugs from the stored options, or just the string if text based. * * @return array */ public function get_slugs() { if ( ! $this->is_taxonomy() || ! taxonomy_exists( $this->get_name() ) ) { return $this->get_options(); } $terms = array(); foreach ( $this->get_options() as $option ) { if ( is_int( $option ) ) { $term = get_term_by( 'id', $option, $this->get_name() ); } else { $term = get_term_by( 'name', $option, $this->get_name() ); if ( ! $term || is_wp_error( $term ) ) { $new_term = wp_insert_term( $option, $this->get_name() ); $term = is_wp_error( $new_term ) ? false : get_term_by( 'id', $new_term['term_id'], $this->get_name() ); } } if ( $term && ! is_wp_error( $term ) ) { $terms[] = $term->slug; } } return $terms; } /** * Returns all data for this object. * * @return array */ public function get_data() { return array_merge( $this->data, array( 'is_visible' => $this->get_visible() ? 1 : 0, 'is_variation' => $this->get_variation() ? 1 : 0, 'is_taxonomy' => $this->is_taxonomy() ? 1 : 0, 'value' => $this->is_taxonomy() ? '' : wc_implode_text_attributes( $this->get_options() ), ) ); } /* |-------------------------------------------------------------------------- | Setters |-------------------------------------------------------------------------- */ /** * Set ID (this is the attribute ID). * * @param int $value Attribute ID. */ public function set_id( $value ) { $this->data['id'] = absint( $value ); } /** * Set name (this is the attribute name or taxonomy). * * @param string $value Attribute name. */ public function set_name( $value ) { $this->data['name'] = $value; } /** * Set options. * * @param array $value Attribute options. */ public function set_options( $value ) { $this->data['options'] = $value; } /** * Set position. * * @param int $value Attribute position. */ public function set_position( $value ) { $this->data['position'] = absint( $value ); } /** * Set if visible. * * @param bool $value If is visible on Product's additional info tab. */ public function set_visible( $value ) { $this->data['visible'] = wc_string_to_bool( $value ); } /** * Set if variation. * * @param bool $value If is used for variations. */ public function set_variation( $value ) { $this->data['variation'] = wc_string_to_bool( $value ); } /* |-------------------------------------------------------------------------- | Getters |-------------------------------------------------------------------------- */ /** * Get the ID. * * @return int */ public function get_id() { return $this->data['id']; } /** * Get name. * * @return string */ public function get_name() { return $this->data['name']; } /** * Get options. * * @return array */ public function get_options() { return $this->data['options']; } /** * Get position. * * @return int */ public function get_position() { return $this->data['position']; } /** * Get if visible. * * @return bool */ public function get_visible() { return $this->data['visible']; } /** * Get if variation. * * @return bool */ public function get_variation() { return $this->data['variation']; } /* |-------------------------------------------------------------------------- | ArrayAccess/Backwards compatibility. |-------------------------------------------------------------------------- */ /** * OffsetGet. * * @param string $offset Offset. * @return mixed */ #[\ReturnTypeWillChange] public function offsetGet( $offset ) { switch ( $offset ) { case 'is_variation': return $this->get_variation() ? 1 : 0; case 'is_visible': return $this->get_visible() ? 1 : 0; case 'is_taxonomy': return $this->is_taxonomy() ? 1 : 0; case 'value': return $this->is_taxonomy() ? '' : wc_implode_text_attributes( $this->get_options() ); default: if ( is_callable( array( $this, "get_$offset" ) ) ) { return $this->{"get_$offset"}(); } break; } return ''; } /** * OffsetSet. * * @param string $offset Offset. * @param mixed $value Value. */ #[\ReturnTypeWillChange] public function offsetSet( $offset, $value ) { switch ( $offset ) { case 'is_variation': $this->set_variation( $value ); break; case 'is_visible': $this->set_visible( $value ); break; case 'value': $this->set_options( $value ); break; default: if ( is_callable( array( $this, "set_$offset" ) ) ) { $this->{"set_$offset"}( $value ); } break; } } /** * OffsetUnset. * * @param string $offset Offset. */ #[\ReturnTypeWillChange] public function offsetUnset( $offset ) {} /** * OffsetExists. * * @param string $offset Offset. * @return bool */ #[\ReturnTypeWillChange] public function offsetExists( $offset ) { return in_array( $offset, array_merge( array( 'is_variation', 'is_visible', 'is_taxonomy', 'value' ), array_keys( $this->data ) ), true ); } }
Save
cmd:
run