X7ROOT File Manager
Current Path:
/home/hamdjcne/public_html/wp-content/plugins/woocommerce/includes
home
/
hamdjcne
/
public_html
/
wp-content
/
plugins
/
woocommerce
/
includes
/
ðŸ“
..
ðŸ“
abstracts
ðŸ“
admin
ðŸ“
blocks
📄
class-wc-ajax.php
(114.64 KB)
📄
class-wc-api.php
(4.99 KB)
📄
class-wc-auth.php
(12.66 KB)
📄
class-wc-autoloader.php
(2.74 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
(10.79 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.37 KB)
📄
class-wc-checkout.php
(46.85 KB)
📄
class-wc-cli.php
(1.7 KB)
📄
class-wc-comments.php
(15.86 KB)
📄
class-wc-countries.php
(48.95 KB)
📄
class-wc-coupon.php
(37.82 KB)
📄
class-wc-customer-download-log.php
(3.37 KB)
📄
class-wc-customer-download.php
(10.45 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
(34.43 KB)
📄
class-wc-download-handler.php
(25.47 KB)
📄
class-wc-emails.php
(25.1 KB)
📄
class-wc-embed.php
(4.18 KB)
📄
class-wc-form-handler.php
(44.74 KB)
📄
class-wc-frontend-scripts.php
(26.5 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
(97.34 KB)
📄
class-wc-integrations.php
(1.28 KB)
📄
class-wc-log-levels.php
(3.9 KB)
📄
class-wc-logger.php
(9.26 KB)
📄
class-wc-meta-data.php
(2.21 KB)
📄
class-wc-order-factory.php
(8.49 KB)
📄
class-wc-order-item-coupon.php
(4.08 KB)
📄
class-wc-order-item-fee.php
(8.76 KB)
📄
class-wc-order-item-meta.php
(5.8 KB)
📄
class-wc-order-item-product.php
(13.58 KB)
📄
class-wc-order-item-shipping.php
(7.78 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.19 KB)
📄
class-wc-payment-gateways.php
(11.1 KB)
📄
class-wc-payment-tokens.php
(6.24 KB)
📄
class-wc-post-data.php
(20.48 KB)
📄
class-wc-post-types.php
(28.19 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.83 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
(1.89 KB)
📄
class-wc-product-variable.php
(21.99 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.2 KB)
📄
class-wc-register-wp-admin-settings.php
(5.05 KB)
📄
class-wc-rest-authentication.php
(19.97 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.72 KB)
📄
class-wc-tax.php
(37.08 KB)
📄
class-wc-template-loader.php
(21.39 KB)
📄
class-wc-tracker.php
(37.18 KB)
📄
class-wc-validation.php
(5.74 KB)
📄
class-wc-webhook.php
(30.11 KB)
📄
class-woocommerce.php
(41.57 KB)
ðŸ“
cli
ðŸ“
customizer
ðŸ“
data-stores
ðŸ“
emails
ðŸ“
export
ðŸ“
gateways
ðŸ“
import
ðŸ“
integrations
ðŸ“
interfaces
ðŸ“
legacy
ðŸ“
libraries
ðŸ“
log-handlers
ðŸ“
payment-tokens
ðŸ“
queue
ðŸ“
react-admin
ðŸ“
rest-api
ðŸ“
shipping
ðŸ“
shortcodes
ðŸ“
theme-support
ðŸ“
tracks
ðŸ“
traits
ðŸ“
walkers
📄
wc-account-functions.php
(12.87 KB)
📄
wc-attribute-functions.php
(20.61 KB)
📄
wc-cart-functions.php
(18.96 KB)
📄
wc-conditional-functions.php
(13.92 KB)
📄
wc-core-functions.php
(79.32 KB)
📄
wc-coupon-functions.php
(2.75 KB)
📄
wc-deprecated-functions.php
(34.08 KB)
📄
wc-formatting-functions.php
(45.32 KB)
📄
wc-notice-functions.php
(8.02 KB)
📄
wc-order-functions.php
(37.1 KB)
📄
wc-order-item-functions.php
(5.03 KB)
📄
wc-page-functions.php
(6.93 KB)
📄
wc-product-functions.php
(50.16 KB)
📄
wc-rest-functions.php
(10.92 KB)
📄
wc-stock-functions.php
(13.54 KB)
📄
wc-template-functions.php
(120.82 KB)
📄
wc-template-hooks.php
(12.56 KB)
📄
wc-term-functions.php
(20.66 KB)
📄
wc-update-functions.php
(79.92 KB)
📄
wc-user-functions.php
(28.56 KB)
📄
wc-webhook-functions.php
(5.6 KB)
📄
wc-widget-functions.php
(2.01 KB)
ðŸ“
wccom-site
ðŸ“
widgets
Editing: class-wc-order-item-meta.php
<?php /** * Order Item Meta * * A Simple class for managing order item meta so plugins add it in the correct format. * * @package WooCommerce\Classes * @deprecated 3.0.0 wc_display_item_meta function is used instead. * @version 2.4 */ defined( 'ABSPATH' ) || exit; /** * Order item meta class. */ class WC_Order_Item_Meta { /** * For handling backwards compatibility. * * @var bool */ private $legacy = false; /** * Order item * * @var array|null */ private $item = null; /** * Post meta data * * @var array|null */ public $meta = null; /** * Product object. * * @var WC_Product|null */ public $product = null; /** * Constructor. * * @param array $item defaults to array(). * @param \WC_Product $product defaults to null. */ public function __construct( $item = array(), $product = null ) { wc_deprecated_function( 'WC_Order_Item_Meta::__construct', '3.1', 'WC_Order_Item_Product' ); // Backwards (pre 2.4) compatibility. if ( ! isset( $item['item_meta'] ) ) { $this->legacy = true; $this->meta = array_filter( (array) $item ); return; } $this->item = $item; $this->meta = array_filter( (array) $item['item_meta'] ); $this->product = $product; } /** * Display meta in a formatted list. * * @param bool $flat Flat (default: false). * @param bool $return Return (default: false). * @param string $hideprefix Hide prefix (default: _). * @param string $delimiter Delimiter used to separate items when $flat is true. * @return string|void */ public function display( $flat = false, $return = false, $hideprefix = '_', $delimiter = ", \n" ) { $output = ''; $formatted_meta = $this->get_formatted( $hideprefix ); if ( ! empty( $formatted_meta ) ) { $meta_list = array(); foreach ( $formatted_meta as $meta ) { if ( $flat ) { $meta_list[] = wp_kses_post( $meta['label'] . ': ' . $meta['value'] ); } else { $meta_list[] = ' <dt class="variation-' . sanitize_html_class( sanitize_text_field( $meta['key'] ) ) . '">' . wp_kses_post( $meta['label'] ) . ':</dt> <dd class="variation-' . sanitize_html_class( sanitize_text_field( $meta['key'] ) ) . '">' . wp_kses_post( wpautop( make_clickable( $meta['value'] ) ) ) . '</dd> '; } } if ( ! empty( $meta_list ) ) { if ( $flat ) { $output .= implode( $delimiter, $meta_list ); } else { $output .= '<dl class="variation">' . implode( '', $meta_list ) . '</dl>'; } } } $output = apply_filters( 'woocommerce_order_items_meta_display', $output, $this, $flat ); if ( $return ) { return $output; } else { echo $output; // WPCS: XSS ok. } } /** * Return an array of formatted item meta in format e.g. * * Returns: array( * 'pa_size' => array( * 'label' => 'Size', * 'value' => 'Medium', * ) * ) * * @since 2.4 * @param string $hideprefix exclude meta when key is prefixed with this, defaults to '_'. * @return array */ public function get_formatted( $hideprefix = '_' ) { if ( $this->legacy ) { return $this->get_formatted_legacy( $hideprefix ); } $formatted_meta = array(); if ( ! empty( $this->item['item_meta_array'] ) ) { foreach ( $this->item['item_meta_array'] as $meta_id => $meta ) { if ( '' === $meta->value || is_serialized( $meta->value ) || ( ! empty( $hideprefix ) && substr( $meta->key, 0, 1 ) === $hideprefix ) ) { continue; } $attribute_key = urldecode( str_replace( 'attribute_', '', $meta->key ) ); $meta_value = $meta->value; // If this is a term slug, get the term's nice name. if ( taxonomy_exists( $attribute_key ) ) { $term = get_term_by( 'slug', $meta_value, $attribute_key ); if ( ! is_wp_error( $term ) && is_object( $term ) && $term->name ) { $meta_value = $term->name; } } $formatted_meta[ $meta_id ] = array( 'key' => $meta->key, 'label' => wc_attribute_label( $attribute_key, $this->product ), 'value' => apply_filters( 'woocommerce_order_item_display_meta_value', $meta_value, $meta, $this->item ), ); } } return apply_filters( 'woocommerce_order_items_meta_get_formatted', $formatted_meta, $this ); } /** * Return an array of formatted item meta in format e.g. * Handles @deprecated args. * * @param string $hideprefix Hide prefix. * * @return array */ public function get_formatted_legacy( $hideprefix = '_' ) { if ( ! wp_doing_ajax() ) { wc_deprecated_argument( 'WC_Order_Item_Meta::get_formatted', '2.4', 'Item Meta Data is being called with legacy arguments' ); } $formatted_meta = array(); foreach ( $this->meta as $meta_key => $meta_values ) { if ( empty( $meta_values ) || ( ! empty( $hideprefix ) && substr( $meta_key, 0, 1 ) === $hideprefix ) ) { continue; } foreach ( (array) $meta_values as $meta_value ) { // Skip serialised meta. if ( is_serialized( $meta_value ) ) { continue; } $attribute_key = urldecode( str_replace( 'attribute_', '', $meta_key ) ); // If this is a term slug, get the term's nice name. if ( taxonomy_exists( $attribute_key ) ) { $term = get_term_by( 'slug', $meta_value, $attribute_key ); if ( ! is_wp_error( $term ) && is_object( $term ) && $term->name ) { $meta_value = $term->name; } } // Unique key required. $formatted_meta_key = $meta_key; $loop = 0; while ( isset( $formatted_meta[ $formatted_meta_key ] ) ) { $loop ++; $formatted_meta_key = $meta_key . '-' . $loop; } $formatted_meta[ $formatted_meta_key ] = array( 'key' => $meta_key, 'label' => wc_attribute_label( $attribute_key, $this->product ), 'value' => apply_filters( 'woocommerce_order_item_display_meta_value', $meta_value, $this->meta, $this->item ), ); } } return $formatted_meta; } }
Upload File
Create Folder