X7ROOT File Manager
Current Path:
/home/gfecatvj/4abetter.us/wp-content/plugins/woocommerce/includes
home
/
gfecatvj
/
4abetter.us
/
wp-content
/
plugins
/
woocommerce
/
includes
/
📁
..
📁
abstracts
📁
admin
📁
blocks
📄
class-wc-ajax.php
(119.74 KB)
📄
class-wc-auth.php
(12.69 KB)
📄
class-wc-autoloader.php
(3.32 KB)
📄
class-wc-background-emailer.php
(4.58 KB)
📄
class-wc-background-updater.php
(3.45 KB)
📄
class-wc-brands-brand-settings-manager.php
(1.78 KB)
📄
class-wc-brands-coupons.php
(6.89 KB)
📄
class-wc-brands.php
(32.93 KB)
📄
class-wc-breadcrumb.php
(9.49 KB)
📄
class-wc-cache-helper.php
(12.65 KB)
📄
class-wc-cart-fees.php
(3.37 KB)
📄
class-wc-cart-session.php
(21.18 KB)
📄
class-wc-cart-totals.php
(28.48 KB)
📄
class-wc-cart.php
(71.23 KB)
📄
class-wc-checkout.php
(50.15 KB)
📄
class-wc-cli.php
(3.34 KB)
📄
class-wc-comments.php
(22.63 KB)
📄
class-wc-countries.php
(49.16 KB)
📄
class-wc-coupon.php
(39.93 KB)
📄
class-wc-customer-download-log.php
(3.37 KB)
📄
class-wc-customer-download.php
(10.34 KB)
📄
class-wc-customer.php
(32.54 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
(36.64 KB)
📄
class-wc-download-handler.php
(28.37 KB)
📄
class-wc-emails.php
(38.15 KB)
📄
class-wc-embed.php
(4.24 KB)
📄
class-wc-form-handler.php
(45.89 KB)
📄
class-wc-frontend-scripts.php
(29.76 KB)
📄
class-wc-geo-ip.php
(30.41 KB)
📄
class-wc-geolite-integration.php
(1.99 KB)
📄
class-wc-geolocation.php
(11.32 KB)
📄
class-wc-https.php
(4.33 KB)
📄
class-wc-install.php
(108.25 KB)
📄
class-wc-integrations.php
(1.28 KB)
📄
class-wc-log-levels.php
(3.9 KB)
📄
class-wc-logger.php
(9.38 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
(9.21 KB)
📄
class-wc-order-item-meta.php
(5.8 KB)
📄
class-wc-order-item-product.php
(15.84 KB)
📄
class-wc-order-item-shipping.php
(8.8 KB)
📄
class-wc-order-item-tax.php
(6.49 KB)
📄
class-wc-order-item.php
(18.54 KB)
📄
class-wc-order-query.php
(2.55 KB)
📄
class-wc-order-refund.php
(5.99 KB)
📄
class-wc-order.php
(75.39 KB)
📄
class-wc-payment-gateways.php
(15.73 KB)
📄
class-wc-payment-tokens.php
(6.24 KB)
📄
class-wc-post-data.php
(34.55 KB)
📄
class-wc-post-types.php
(32 KB)
📄
class-wc-privacy-background-process.php
(1.79 KB)
📄
class-wc-privacy-erasers.php
(13.61 KB)
📄
class-wc-privacy-exporters.php
(14.69 KB)
📄
class-wc-privacy.php
(17.22 KB)
📄
class-wc-product-attribute.php
(6.97 KB)
📄
class-wc-product-download.php
(12.25 KB)
📄
class-wc-product-external.php
(4.98 KB)
📄
class-wc-product-factory.php
(3.88 KB)
📄
class-wc-product-grouped.php
(6.53 KB)
📄
class-wc-product-query.php
(2.28 KB)
📄
class-wc-product-simple.php
(2.7 KB)
📄
class-wc-product-variable.php
(22.41 KB)
📄
class-wc-product-variation.php
(20.18 KB)
📄
class-wc-query.php
(33.36 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
(22.54 KB)
📄
class-wc-shipping-rate.php
(9.34 KB)
📄
class-wc-shipping-zone.php
(13.08 KB)
📄
class-wc-shipping-zones.php
(4.01 KB)
📄
class-wc-shipping.php
(12.85 KB)
📄
class-wc-shortcodes.php
(18.82 KB)
📄
class-wc-structured-data.php
(23.73 KB)
📄
class-wc-tax.php
(38.31 KB)
📄
class-wc-template-loader.php
(20.28 KB)
📄
class-wc-tracker.php
(49.37 KB)
📄
class-wc-validation.php
(5.79 KB)
📄
class-wc-webhook.php
(29.41 KB)
📄
class-woocommerce.php
(59.56 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
(14.11 KB)
📄
wc-attribute-functions.php
(21.85 KB)
📄
wc-brands-functions.php
(4.17 KB)
📄
wc-cart-functions.php
(21.05 KB)
📄
wc-conditional-functions.php
(15.53 KB)
📄
wc-core-functions.php
(86.78 KB)
📄
wc-coupon-functions.php
(5.55 KB)
📄
wc-deprecated-functions.php
(38.12 KB)
📄
wc-formatting-functions.php
(49.85 KB)
📄
wc-notice-functions.php
(8.08 KB)
📄
wc-order-functions.php
(42.75 KB)
📄
wc-order-item-functions.php
(5.03 KB)
📄
wc-order-step-logger-functions.php
(5.01 KB)
📄
wc-page-functions.php
(9.43 KB)
📄
wc-product-functions.php
(57.36 KB)
📄
wc-rest-functions.php
(13.92 KB)
📄
wc-stock-functions.php
(17.13 KB)
📄
wc-template-functions.php
(138.36 KB)
📄
wc-template-hooks.php
(12.84 KB)
📄
wc-term-functions.php
(23.84 KB)
📄
wc-update-functions.php
(94.71 KB)
📄
wc-user-functions.php
(34.2 KB)
📄
wc-webhook-functions.php
(5.77 KB)
📄
wc-widget-functions.php
(2.01 KB)
📁
wccom-site
📁
widgets
Editing: class-wc-shipping-rate.php
<?php /** * WooCommerce Shipping Rate * * Simple Class for storing rates. * * @package WooCommerce\Classes\Shipping * @since 2.6.0 */ declare( strict_types=1 ); defined( 'ABSPATH' ) || exit; use Automattic\WooCommerce\Enums\ProductTaxStatus; /** * Shipping rate class. */ class WC_Shipping_Rate implements JsonSerializable { /** * Stores data for this rate. * * @since 9.2.0 Added description and delivery_time. * @var array */ protected $data = array( 'id' => '', 'method_id' => '', 'instance_id' => 0, 'label' => '', 'cost' => 0, 'taxes' => array(), 'tax_status' => ProductTaxStatus::TAXABLE, 'description' => '', 'delivery_time' => '', ); /** * Stores meta data for this rate. * * @var array */ protected $meta_data = array(); /** * Constructor. * * @param string $id Shipping rate ID. * @param string $label Shipping rate label. * @param integer $cost Cost. * @param array $taxes Taxes applied to shipping rate. * @param string $method_id Shipping method ID. * @param int $instance_id Shipping instance ID. * @param string $tax_status Tax status. * @param string $description Shipping rate description. * @param string $delivery_time Shipping rate delivery time. */ public function __construct( $id = '', $label = '', $cost = 0, $taxes = array(), $method_id = '', $instance_id = 0, $tax_status = ProductTaxStatus::TAXABLE, $description = '', $delivery_time = '' ) { $this->set_id( $id ); $this->set_label( $label ); $this->set_cost( $cost ); $this->set_taxes( $taxes ); $this->set_method_id( $method_id ); $this->set_instance_id( $instance_id ); $this->set_tax_status( $tax_status ); $this->set_description( $description ); $this->set_delivery_time( $delivery_time ); } /** * Magic method to support direct access to data prop. * * @param string $key Key. * @return bool */ public function __isset( $key ) { return isset( $this->data[ $key ] ); } /** * Magic methods to support direct access to props. * * @param string $key Key. * @return mixed */ public function __get( $key ) { if ( is_callable( array( $this, "get_{$key}" ) ) ) { return $this->{"get_{$key}"}(); } if ( isset( $this->data[ $key ] ) ) { return $this->data[ $key ]; } return ''; } /** * Magic methods to support direct access to props. * * @since 3.2.0 * @param string $key Key. * @param mixed $value Value. */ public function __set( $key, $value ) { if ( is_callable( array( $this, "set_{$key}" ) ) ) { $this->{"set_{$key}"}( $value ); } else { $this->data[ $key ] = $value; } } /** * When converted to JSON. * * @return object|array */ #[\ReturnTypeWillChange] public function jsonSerialize() { return array( 'data' => $this->data, 'meta_data' => $this->meta_data, ); } /** * Set ID for the rate. This is usually a combination of the method and instance IDs. * * @since 3.2.0 * @param string $id Shipping rate ID. */ public function set_id( $id ) { $this->data['id'] = (string) $id; } /** * Set shipping method ID the rate belongs to. * * @since 3.2.0 * @param string $method_id Shipping method ID. */ public function set_method_id( $method_id ) { $this->data['method_id'] = (string) $method_id; } /** * Set instance ID the rate belongs to. * * @since 3.2.0 * @param int $instance_id Instance ID. */ public function set_instance_id( $instance_id ) { $this->data['instance_id'] = absint( $instance_id ); } /** * Set rate label. * * @since 3.2.0 * @param string $label Shipping rate label. */ public function set_label( $label ) { $this->data['label'] = (string) $label; } /** * Set rate cost. * * @todo 4.0 Prevent negative value being set. #19293 * @since 3.2.0 * @param string $cost Shipping rate cost. */ public function set_cost( $cost ) { $this->data['cost'] = $cost; } /** * Set rate taxes. * * @since 3.2.0 * @param array $taxes List of taxes applied to shipping rate. */ public function set_taxes( $taxes ) { $this->data['taxes'] = ! empty( $taxes ) && is_array( $taxes ) ? $taxes : array(); } /** * Set tax status. * * @since 9.6.0 * @param string $value Tax status. */ public function set_tax_status( $value ) { if ( in_array( $value, array( ProductTaxStatus::TAXABLE, ProductTaxStatus::NONE ), true ) ) { $this->data['tax_status'] = $value; } } /** * Set rate description. * * @since 9.2.0 * @param string $description Shipping rate description. */ public function set_description( $description ) { $this->data['description'] = (string) $description; } /** * Set rate delivery time. * * @since 9.2.0 * @param string $delivery_time Shipping rate delivery time. */ public function set_delivery_time( $delivery_time ) { $this->data['delivery_time'] = (string) $delivery_time; } /** * Get ID for the rate. This is usually a combination of the method and instance IDs. * * @since 3.2.0 * @return string */ public function get_id() { /** * Filter the shipping rate ID. * * @since 3.2.0 * @param string $id The shipping rate ID. * @param WC_Shipping_Rate $this The shipping rate object. */ return apply_filters( 'woocommerce_shipping_rate_id', $this->data['id'], $this ); } /** * Get shipping method ID the rate belongs to. * * @since 3.2.0 * @return string */ public function get_method_id() { /** * Filter the shipping method ID. * * @since 3.2.0 * @param string $method_id The shipping method ID. * @param WC_Shipping_Rate $this The shipping rate object. */ return apply_filters( 'woocommerce_shipping_rate_method_id', $this->data['method_id'], $this ); } /** * Get instance ID the rate belongs to. * * @since 3.2.0 * @return int */ public function get_instance_id() { /** * Filter the shipping rate instance ID. * * @since 3.2.0 * @param int $instance_id The shipping rate instance ID. * @param WC_Shipping_Rate $this The shipping rate object. */ return apply_filters( 'woocommerce_shipping_rate_instance_id', $this->data['instance_id'], $this ); } /** * Get rate label. * * @return string */ public function get_label() { /** * Filter the shipping rate label. * * @since 3.2.0 * @param string $label The shipping rate label. * @param WC_Shipping_Rate $this The shipping rate object. */ return apply_filters( 'woocommerce_shipping_rate_label', $this->data['label'], $this ); } /** * Get rate cost. * * @since 3.2.0 * @return string */ public function get_cost() { /** * Filter the shipping rate cost. * * @since 3.2.0 * @param string $cost The shipping rate cost. * @param WC_Shipping_Rate $this The shipping rate object. */ return apply_filters( 'woocommerce_shipping_rate_cost', $this->data['cost'], $this ); } /** * Get rate taxes. * * @since 3.2.0 * @return array */ public function get_taxes() { /** * Filter the shipping rate taxes. * * @since 3.2.0 * @param array $taxes The shipping rate taxes. * @param WC_Shipping_Rate $this The shipping rate object. */ return apply_filters( 'woocommerce_shipping_rate_taxes', $this->data['taxes'], $this ); } /** * Get shipping tax. * * @return float */ public function get_shipping_tax() { $taxes = $this->get_taxes(); /** * Filter the shipping rate taxes. * * @since 3.2.0 * @param array $taxes The shipping rate taxes. * @param WC_Shipping_Rate $this The shipping rate object. */ return apply_filters( 'woocommerce_get_shipping_tax', count( $taxes ) > 0 && ! WC()->customer->get_is_vat_exempt() ? (float) array_sum( $taxes ) : 0.0, $this ); } /** * Get tax status. * * @return string */ public function get_tax_status() { /** * Filter to allow tax status to be overridden for a shipping rate. * * @since 9.9.0 * @param string $tax_status Tax status. * @param WC_Shipping_Rate $this Shipping rate object. */ return apply_filters( 'woocommerce_shipping_rate_tax_status', $this->data['tax_status'], $this ); } /** * Get rate description. * * @since 9.2.0 * @return string */ public function get_description() { /** * Filter the shipping rate description. * * @since 9.2.0 * * @param string $description The current description. * @param WC_Shipping_Rate $this The shipping rate. */ return apply_filters( 'woocommerce_shipping_rate_description', $this->data['description'], $this ); } /** * Get rate delivery time. * * @since 9.2.0 * @return string */ public function get_delivery_time() { /** * Filter the shipping rate delivery time. * * @since 9.2.0 * * @param string $delivery_time The current description. * @param WC_Shipping_Rate $this The shipping rate. */ return apply_filters( 'woocommerce_shipping_rate_delivery_time', $this->data['delivery_time'], $this ); } /** * Add some meta data for this rate. * * @since 2.6.0 * @param string $key Key. * @param string $value Value. */ public function add_meta_data( $key, $value ) { $this->meta_data[ wc_clean( $key ) ] = wc_clean( $value ); } /** * Get all meta data for this rate. * * @since 2.6.0 * @return array */ public function get_meta_data() { return $this->meta_data; } }
Upload File
Create Folder