• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
    • Help
      • Online help
      • Learn Git
      • Welcome to Bitbucket
      • Keyboard shortcuts
    • Log In
    Blackrock
    1. Blackrock

    main

    Public
    Actions
    • Clone

    Learn more about cloning repositories

    You have read-only access

    Navigation
    • Source
    • Commits
    • Branches
    • All Branches Graph
    • Graphs
    • Forks
    1. Blackrock
    2. main

    Source

    main/wp-content/plugins/woocommerce/includes/class-wc-order-item-meta.php
    Артем ШиряевАртем Ширяев committed 554847ddcb906 Apr 2021
    Raw file
    Source viewDiff to previous
                            <dd class="variation-' . sanitize_html_class( sanitize_text_field( $meta['key'] ) ) . '">' . wp_kses_post( wpautop( make_clickable( $meta['value'] ) ) ) . '</dd>
     
    1
    <?php
    2
    /**
    3
     * Order Item Meta
    4
     *
    5
     * A Simple class for managing order item meta so plugins add it in the correct format.
    6
     *
    7
     * @package     WooCommerce\Classes
    8
     * @deprecated  3.0.0 wc_display_item_meta function is used instead.
    9
     * @version     2.4
    10
     */
    11
    ​
    12
    defined( 'ABSPATH' ) || exit;
    13
    ​
    14
    /**
    15
     * Order item meta class.
    16
     */
    17
    class WC_Order_Item_Meta {
    18
    ​
    19
        /**
    20
         * For handling backwards compatibility.
    21
         *
    22
         * @var bool
    23
         */
    24
        private $legacy = false;
    25
    ​
    26
        /**
    27
         * Order item
    28
         *
    29
         * @var array|null
    30
         */
    31
        private $item = null;
    32
    ​
    33
        /**
    34
         * Post meta data
    35
         *
    36
         * @var array|null
    37
         */
    38
        public $meta = null;
    39
    ​
    40
        /**
    41
         * Product object.
    42
         *
    43
         * @var WC_Product|null
    44
         */
    45
        public $product = null;
    46
    ​
    47
        /**
    48
         * Constructor.
    49
         *
    50
         * @param array       $item defaults to array().
    51
         * @param \WC_Product $product defaults to null.
    52
         */
    53
        public function __construct( $item = array(), $product = null ) {
    54
            wc_deprecated_function( 'WC_Order_Item_Meta::__construct', '3.1', 'WC_Order_Item_Product' );
    55
    ​
    56
            // Backwards (pre 2.4) compatibility.
    57
            if ( ! isset( $item['item_meta'] ) ) {
    58
                $this->legacy = true;
    59
                $this->meta   = array_filter( (array) $item );
    60
                return;
    61
            }
    62
            $this->item    = $item;
    63
            $this->meta    = array_filter( (array) $item['item_meta'] );
    • Git repository management for enterprise teams powered by Atlassian Bitbucket
    • Atlassian Bitbucket v5.10.1
    • Documentation
    • Contact Support
    • Request a feature
    • About
    • Contact Atlassian
    Atlassian

    Everything looks good. Well let you know here if theres anything you should know about.