X7ROOT File Manager
Current Path:
/home/notabjze/pyirates.net/wp-content/plugins/woocommerce/includes
home
/
notabjze
/
pyirates.net
/
wp-content
/
plugins
/
woocommerce
/
includes
/
ðŸ“
..
ðŸ“
abstracts
ðŸ“
admin
ðŸ“
blocks
📄
class-wc-ajax.php
(114.64 KB)
📄
class-wc-auth.php
(12.69 KB)
📄
class-wc-autoloader.php
(3.13 KB)
📄
class-wc-background-emailer.php
(4.58 KB)
📄
class-wc-background-updater.php
(3.45 KB)
📄
class-wc-breadcrumb.php
(9.49 KB)
📄
class-wc-cache-helper.php
(11.17 KB)
📄
class-wc-cart-fees.php
(3.37 KB)
📄
class-wc-cart-session.php
(17.81 KB)
📄
class-wc-cart-totals.php
(28.25 KB)
📄
class-wc-cart.php
(66.4 KB)
📄
class-wc-checkout.php
(46.93 KB)
📄
class-wc-cli.php
(2.57 KB)
📄
class-wc-comments.php
(15.86 KB)
📄
class-wc-countries.php
(48.92 KB)
📄
class-wc-coupon.php
(37.88 KB)
📄
class-wc-customer-download-log.php
(3.37 KB)
📄
class-wc-customer-download.php
(10.34 KB)
📄
class-wc-customer.php
(29.68 KB)
📄
class-wc-data-exception.php
(1.29 KB)
📄
class-wc-data-store.php
(6.59 KB)
📄
class-wc-datetime.php
(2.26 KB)
📄
class-wc-deprecated-action-hooks.php
(6.59 KB)
📄
class-wc-deprecated-filter-hooks.php
(7.34 KB)
📄
class-wc-discounts.php
(35.04 KB)
📄
class-wc-download-handler.php
(28.38 KB)
📄
class-wc-emails.php
(25.09 KB)
📄
class-wc-embed.php
(4.18 KB)
📄
class-wc-form-handler.php
(44.65 KB)
📄
class-wc-frontend-scripts.php
(27.03 KB)
📄
class-wc-geo-ip.php
(30.41 KB)
📄
class-wc-geolite-integration.php
(1.99 KB)
📄
class-wc-geolocation.php
(10.44 KB)
📄
class-wc-https.php
(4.33 KB)
📄
class-wc-install.php
(100.99 KB)
📄
class-wc-integrations.php
(1.28 KB)
📄
class-wc-log-levels.php
(3.9 KB)
📄
class-wc-logger.php
(9.29 KB)
📄
class-wc-meta-data.php
(2.21 KB)
📄
class-wc-order-factory.php
(8.52 KB)
📄
class-wc-order-item-coupon.php
(4.08 KB)
📄
class-wc-order-item-fee.php
(8.85 KB)
📄
class-wc-order-item-meta.php
(5.8 KB)
📄
class-wc-order-item-product.php
(13.7 KB)
📄
class-wc-order-item-shipping.php
(7.85 KB)
📄
class-wc-order-item-tax.php
(6.49 KB)
📄
class-wc-order-item.php
(11.65 KB)
📄
class-wc-order-query.php
(2.55 KB)
📄
class-wc-order-refund.php
(5.63 KB)
📄
class-wc-order.php
(69.28 KB)
📄
class-wc-payment-gateways.php
(11.36 KB)
📄
class-wc-payment-tokens.php
(6.24 KB)
📄
class-wc-post-data.php
(20.89 KB)
📄
class-wc-post-types.php
(31.84 KB)
📄
class-wc-privacy-background-process.php
(1.67 KB)
📄
class-wc-privacy-erasers.php
(13.61 KB)
📄
class-wc-privacy-exporters.php
(14.69 KB)
📄
class-wc-privacy.php
(15.82 KB)
📄
class-wc-product-attribute.php
(6.97 KB)
📄
class-wc-product-download.php
(12.25 KB)
📄
class-wc-product-external.php
(4.84 KB)
📄
class-wc-product-factory.php
(3.58 KB)
📄
class-wc-product-grouped.php
(5.22 KB)
📄
class-wc-product-query.php
(2.18 KB)
📄
class-wc-product-simple.php
(2.64 KB)
📄
class-wc-product-variable.php
(22.07 KB)
📄
class-wc-product-variation.php
(16.87 KB)
📄
class-wc-query.php
(32.6 KB)
📄
class-wc-rate-limiter.php
(4 KB)
📄
class-wc-regenerate-images-request.php
(7.74 KB)
📄
class-wc-regenerate-images.php
(15.44 KB)
📄
class-wc-register-wp-admin-settings.php
(5.05 KB)
📄
class-wc-rest-authentication.php
(21.55 KB)
📄
class-wc-rest-exception.php
(276 B)
📄
class-wc-session-handler.php
(15.03 KB)
📄
class-wc-shipping-rate.php
(5.51 KB)
📄
class-wc-shipping-zone.php
(13.08 KB)
📄
class-wc-shipping-zones.php
(4.01 KB)
📄
class-wc-shipping.php
(11.57 KB)
📄
class-wc-shortcodes.php
(18.67 KB)
📄
class-wc-structured-data.php
(18.88 KB)
📄
class-wc-tax.php
(37.08 KB)
📄
class-wc-template-loader.php
(21.39 KB)
📄
class-wc-tracker.php
(37.42 KB)
📄
class-wc-validation.php
(5.79 KB)
📄
class-wc-webhook.php
(29.34 KB)
📄
class-woocommerce.php
(45.52 KB)
ðŸ“
cli
ðŸ“
customizer
ðŸ“
data-stores
ðŸ“
emails
ðŸ“
export
ðŸ“
gateways
ðŸ“
import
ðŸ“
integrations
ðŸ“
interfaces
ðŸ“
legacy
ðŸ“
libraries
ðŸ“
log-handlers
ðŸ“
payment-tokens
ðŸ“
product-usage
ðŸ“
queue
ðŸ“
react-admin
ðŸ“
rest-api
ðŸ“
shipping
ðŸ“
shortcodes
ðŸ“
theme-support
ðŸ“
tracks
ðŸ“
traits
ðŸ“
walkers
📄
wc-account-functions.php
(13.23 KB)
📄
wc-attribute-functions.php
(21.12 KB)
📄
wc-cart-functions.php
(19.9 KB)
📄
wc-conditional-functions.php
(13.92 KB)
📄
wc-core-functions.php
(80.68 KB)
📄
wc-coupon-functions.php
(2.75 KB)
📄
wc-deprecated-functions.php
(34.08 KB)
📄
wc-formatting-functions.php
(45.5 KB)
📄
wc-notice-functions.php
(8.02 KB)
📄
wc-order-functions.php
(38.93 KB)
📄
wc-order-item-functions.php
(5.03 KB)
📄
wc-page-functions.php
(8.3 KB)
📄
wc-product-functions.php
(53.13 KB)
📄
wc-rest-functions.php
(12.62 KB)
📄
wc-stock-functions.php
(16.64 KB)
📄
wc-template-functions.php
(123.9 KB)
📄
wc-template-hooks.php
(12.67 KB)
📄
wc-term-functions.php
(20.66 KB)
📄
wc-update-functions.php
(86.64 KB)
📄
wc-user-functions.php
(28.67 KB)
📄
wc-webhook-functions.php
(5.77 KB)
📄
wc-widget-functions.php
(2.01 KB)
ðŸ“
wccom-site
ðŸ“
widgets
Editing: class-wc-product-attribute.php
<?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 ); } }
Upload File
Create Folder