plugin updates
This commit is contained in:
@@ -2,14 +2,14 @@
|
||||
# This file is distributed under the same license as the WooCommerce plugin.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WooCommerce 9.1.2\n"
|
||||
"Project-Id-Version: WooCommerce 9.1.4\n"
|
||||
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"POT-Creation-Date: 2024-07-12T13:15:07+00:00\n"
|
||||
"POT-Creation-Date: 2024-07-26T11:16:47+00:00\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"X-Generator: WP-CLI 2.10.0\n"
|
||||
"X-Domain: woocommerce\n"
|
||||
@@ -21543,7 +21543,7 @@ msgid "Add new product"
|
||||
msgstr ""
|
||||
|
||||
#: includes/class-wc-post-types.php:332
|
||||
#: includes/tracks/events/class-wc-products-tracking.php:149
|
||||
#: includes/tracks/events/class-wc-products-tracking.php:148
|
||||
msgid "Edit product"
|
||||
msgstr ""
|
||||
|
||||
@@ -35262,7 +35262,7 @@ msgstr ""
|
||||
|
||||
#. translators: %s is a product attribute name.
|
||||
#. translators: %s attribute name.
|
||||
#: src/Blocks/BlockTypes/ProductFilterAttribute.php:247
|
||||
#: src/Blocks/BlockTypes/ProductFilterAttribute.php:248
|
||||
#: assets/client/blocks/attribute-filter-frontend.js:7
|
||||
#: assets/client/blocks/attribute-filter-wrapper-frontend.js:7
|
||||
#: assets/client/blocks/attribute-filter.js:13
|
||||
|
||||
@@ -45,7 +45,7 @@ final class WooCommerce {
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $version = '9.1.2';
|
||||
public $version = '9.1.4';
|
||||
|
||||
/**
|
||||
* WooCommerce Schema version.
|
||||
|
||||
@@ -279,7 +279,7 @@ class WC_Product_Data_Store_CPT extends WC_Data_Store_WP implements WC_Object_Da
|
||||
$product->apply_changes();
|
||||
|
||||
// phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
|
||||
do_action( 'woocommerce_update_product', $product->get_id(), $product, $changes );
|
||||
do_action( 'woocommerce_update_product', $product->get_id(), $product );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,8 +29,7 @@ class WC_Products_Tracking {
|
||||
add_action( 'load-edit.php', array( $this, 'track_products_view' ), 10 );
|
||||
add_action( 'load-edit-tags.php', array( $this, 'track_categories_and_tags_view' ), 10, 2 );
|
||||
add_action( 'edit_post', array( $this, 'track_product_updated' ), 10, 2 );
|
||||
add_action( 'woocommerce_new_product', array( $this, 'track_product_published' ), 10, 3 );
|
||||
add_action( 'woocommerce_update_product', array( $this, 'track_product_published' ), 10, 3 );
|
||||
add_action( 'wp_after_insert_post', array( $this, 'track_product_published' ), 10, 4 );
|
||||
add_action( 'created_product_cat', array( $this, 'track_product_category_created' ) );
|
||||
add_action( 'edited_product_cat', array( $this, 'track_product_category_updated' ) );
|
||||
add_action( 'add_meta_boxes_product', array( $this, 'track_product_updated_client_side' ), 10 );
|
||||
@@ -304,21 +303,24 @@ class WC_Products_Tracking {
|
||||
/**
|
||||
* Send a Tracks event when a product is published.
|
||||
*
|
||||
* @param int $product_id Product ID.
|
||||
* @param WC_Product $product Product object.
|
||||
* @param array $changes Product changes.
|
||||
* @param int $post_id Post ID.
|
||||
* @param WP_Post $post Post object.
|
||||
* @param bool $update Whether this is an existing post being updated.
|
||||
* @param null|WP_Post $post_before Null for new posts, the WP_Post object prior
|
||||
* to the update for updated posts.
|
||||
*/
|
||||
public function track_product_published( $product_id, $product, $changes = null ) {
|
||||
public function track_product_published( $post_id, $post, $update, $post_before ) {
|
||||
if (
|
||||
! isset( $product ) ||
|
||||
'product' !== $product->post_type ||
|
||||
'publish' !== $product->get_status( 'edit' ) ||
|
||||
( $changes && ! isset( $changes['status'] ) )
|
||||
'product' !== $post->post_type ||
|
||||
'publish' !== $post->post_status ||
|
||||
( $post_before && 'publish' === $post_before->post_status )
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
$product_type_options = self::get_product_type_options( $product_id );
|
||||
$product = wc_get_product( $post_id );
|
||||
|
||||
$product_type_options = self::get_product_type_options( $post_id );
|
||||
$product_type_options_string = self::get_product_type_options_string( $product_type_options );
|
||||
|
||||
$properties = array(
|
||||
@@ -332,7 +334,7 @@ class WC_Products_Tracking {
|
||||
'is_virtual' => $product->is_virtual() ? 'yes' : 'no',
|
||||
'manage_stock' => $product->get_manage_stock() ? 'yes' : 'no',
|
||||
'menu_order' => $product->get_menu_order() ? 'yes' : 'no',
|
||||
'product_id' => $product_id,
|
||||
'product_id' => $post_id,
|
||||
'product_gallery' => count( $product->get_gallery_image_ids() ),
|
||||
'product_image' => $product->get_image_id() ? 'yes' : 'no',
|
||||
'product_type' => $product->get_type(),
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
=== WooCommerce ===
|
||||
Contributors: automattic, woocommerce, mikejolley, jameskoster, claudiosanches, rodrigosprimo, peterfabian1000, vedjain, jamosova, obliviousharmony, konamiman, sadowski, wpmuguru, royho, barryhughes-1, claudiulodro, tiagonoronha, ryelle, levinmedia, aljullu, nerrad, joshuawold, assassinateur, haszari, mppfeiffer, nielslange, opr18, ralucastn, tjcafferkey, danielwrobert, patriciahillebrandt, albarin, dinhtungdu, imanish003, karolmanijak, sunyatasattva, alexandrelara, gigitux, danieldudzic, samueljseay, alexflorisca, opr18, tarunvijwani, pauloarromba, saadtarhi, bor0, kloon, coreymckrill, jorgeatorres, leifsinger
|
||||
Tags: online store, ecommerce, shop, shopping cart, sell online
|
||||
Requires at least: 6.4
|
||||
Tested up to: 6.5
|
||||
Requires at least: 6.5
|
||||
Tested up to: 6.6
|
||||
Requires PHP: 7.4
|
||||
Stable tag: 9.1.0
|
||||
Stable tag: 9.1.2
|
||||
License: GPLv3
|
||||
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
@@ -169,10 +169,13 @@ WooCommerce comes with some sample data you can use to see how products look; im
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 9.1.1 2024-07-11 =
|
||||
= 9.1.4 2024-07-26 =
|
||||
|
||||
**WooCommerce**
|
||||
|
||||
* Tweak - Revert #46262, as that PR would render input values invisible under certain conditions. [49404](https://github.com/woocommerce/woocommerce/pull/49404)
|
||||
* Fix - Revert fixing terms count in tracking PR as it caused product_add_publish to be triggered more than usual. [#49797](https://github.com/woocommerce/woocommerce/pull/49797)
|
||||
* Fix - Hardening against XSS via the Product Button unescaped attribute. [#50010](https://github.com/woocommerce/woocommerce/pull/50010)
|
||||
* Fix - Enhance escaping for block attributes. [#50015](https://github.com/woocommerce/woocommerce/pull/50015)
|
||||
|
||||
|
||||
[See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/changelog.txt).
|
||||
|
||||
@@ -167,8 +167,8 @@ class ProductButton extends AbstractBlock {
|
||||
);
|
||||
|
||||
$div_directives = '
|
||||
data-wc-interactive=\'' . wp_json_encode( $interactive, JSON_NUMERIC_CHECK ) . '\'
|
||||
data-wc-context=\'' . wp_json_encode( $context, JSON_NUMERIC_CHECK ) . '\'
|
||||
data-wc-interactive=\'' . wp_json_encode( $interactive, JSON_NUMERIC_CHECK | JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ) . '\'
|
||||
data-wc-context=\'' . wp_json_encode( $context, JSON_NUMERIC_CHECK | JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ) . '\'
|
||||
';
|
||||
|
||||
$button_directives = '
|
||||
|
||||
@@ -112,7 +112,7 @@ class ProductCollection extends AbstractBlock {
|
||||
'data-wc-navigation-id',
|
||||
'wc-product-collection-' . $this->parsed_block['attrs']['queryId']
|
||||
);
|
||||
$p->set_attribute( 'data-wc-interactive', wp_json_encode( array( 'namespace' => 'woocommerce/product-collection' ) ) );
|
||||
$p->set_attribute( 'data-wc-interactive', wp_json_encode( array( 'namespace' => 'woocommerce/product-collection' ), JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ) );
|
||||
$p->set_attribute(
|
||||
'data-wc-context',
|
||||
wp_json_encode(
|
||||
@@ -124,7 +124,7 @@ class ProductCollection extends AbstractBlock {
|
||||
// This way we avoid prefetching when the page loads.
|
||||
'isPrefetchNextOrPreviousLink' => false,
|
||||
),
|
||||
JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP
|
||||
JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP
|
||||
)
|
||||
);
|
||||
$block_content = $p->get_updated_html();
|
||||
@@ -226,7 +226,7 @@ class ProductCollection extends AbstractBlock {
|
||||
'class_name' => $class_name,
|
||||
)
|
||||
) ) {
|
||||
$processor->set_attribute( 'data-wc-interactive', wp_json_encode( array( 'namespace' => 'woocommerce/product-collection' ) ) );
|
||||
$processor->set_attribute( 'data-wc-interactive', wp_json_encode( array( 'namespace' => 'woocommerce/product-collection' ), JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ) );
|
||||
$processor->set_attribute( 'data-wc-on--click', 'actions.navigate' );
|
||||
$processor->set_attribute( 'data-wc-key', $key_prefix . '--' . esc_attr( wp_rand() ) );
|
||||
|
||||
|
||||
@@ -115,8 +115,8 @@ final class ProductFilter extends AbstractBlock {
|
||||
}
|
||||
|
||||
$attributes_data = array(
|
||||
'data-wc-interactive' => wp_json_encode( array( 'namespace' => $this->get_full_block_name() ) ),
|
||||
'data-wc-context' => wp_json_encode( array( 'hasSelectedFilter' => $has_selected_filter ) ),
|
||||
'data-wc-interactive' => wp_json_encode( array( 'namespace' => $this->get_full_block_name() ), JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ),
|
||||
'data-wc-context' => wp_json_encode( array( 'hasSelectedFilter' => $has_selected_filter ), JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ),
|
||||
'class' => 'wc-block-product-filters',
|
||||
);
|
||||
|
||||
|
||||
@@ -55,8 +55,8 @@ final class ProductFilterActive extends AbstractBlock {
|
||||
|
||||
$wrapper_attributes = get_block_wrapper_attributes(
|
||||
array(
|
||||
'data-wc-interactive' => wp_json_encode( array( 'namespace' => $this->get_full_block_name() ) ),
|
||||
'data-wc-context' => wp_json_encode( $context ),
|
||||
'data-wc-interactive' => wp_json_encode( array( 'namespace' => $this->get_full_block_name() ), JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ),
|
||||
'data-wc-context' => wp_json_encode( $context, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ),
|
||||
'data-has-filter' => empty( $active_filters ) ? 'no' : 'yes',
|
||||
)
|
||||
);
|
||||
@@ -185,7 +185,7 @@ final class ProductFilterActive extends AbstractBlock {
|
||||
private function get_html_attributes( $attributes ) {
|
||||
return array_reduce(
|
||||
array_keys( $attributes ),
|
||||
function( $acc, $key ) use ( $attributes ) {
|
||||
function ( $acc, $key ) use ( $attributes ) {
|
||||
$acc .= sprintf( ' %1$s="%2$s"', esc_attr( $key ), esc_attr( $attributes[ $key ] ) );
|
||||
return $acc;
|
||||
},
|
||||
@@ -227,7 +227,7 @@ final class ProductFilterActive extends AbstractBlock {
|
||||
|
||||
return array_filter(
|
||||
$url_query_params,
|
||||
function( $key ) use ( $filter_param_keys ) {
|
||||
function ( $key ) use ( $filter_param_keys ) {
|
||||
return in_array( $key, $filter_param_keys, true );
|
||||
},
|
||||
ARRAY_FILTER_USE_KEY
|
||||
|
||||
@@ -107,7 +107,8 @@ final class ProductFilterAttribute extends AbstractBlock {
|
||||
'value' => $term,
|
||||
'attributeSlug' => $product_attribute,
|
||||
'queryType' => get_query_var( "query_type_{$product_attribute}" ),
|
||||
)
|
||||
),
|
||||
JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -146,7 +147,7 @@ final class ProductFilterAttribute extends AbstractBlock {
|
||||
'<div %s></div>',
|
||||
get_block_wrapper_attributes(
|
||||
array(
|
||||
'data-wc-interactive' => wp_json_encode( array( 'namespace' => $this->get_full_block_name() ) ),
|
||||
'data-wc-interactive' => wp_json_encode( array( 'namespace' => $this->get_full_block_name() ), JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ),
|
||||
'data-has-filter' => 'no',
|
||||
)
|
||||
),
|
||||
@@ -198,8 +199,8 @@ final class ProductFilterAttribute extends AbstractBlock {
|
||||
'<div %1$s>%2$s%3$s</div>',
|
||||
get_block_wrapper_attributes(
|
||||
array(
|
||||
'data-wc-context' => wp_json_encode( $context ),
|
||||
'data-wc-interactive' => wp_json_encode( array( 'namespace' => $this->get_full_block_name() ) ),
|
||||
'data-wc-context' => wp_json_encode( $context, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ),
|
||||
'data-wc-interactive' => wp_json_encode( array( 'namespace' => $this->get_full_block_name() ), JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ),
|
||||
'data-has-filter' => 'yes',
|
||||
)
|
||||
),
|
||||
@@ -320,7 +321,7 @@ final class ProductFilterAttribute extends AbstractBlock {
|
||||
|
||||
$attribute_counts = array_reduce(
|
||||
$attribute_counts,
|
||||
function( $acc, $count ) {
|
||||
function ( $acc, $count ) {
|
||||
$acc[ $count['term'] ] = $count['count'];
|
||||
return $acc;
|
||||
},
|
||||
|
||||
@@ -44,7 +44,7 @@ final class ProductFilterPrice extends AbstractBlock {
|
||||
public function get_filter_query_param_keys( $filter_param_keys, $url_param_keys ) {
|
||||
$price_param_keys = array_filter(
|
||||
$url_param_keys,
|
||||
function( $param ) {
|
||||
function ( $param ) {
|
||||
return self::MIN_PRICE_QUERY_VAR === $param || self::MAX_PRICE_QUERY_VAR === $param;
|
||||
}
|
||||
);
|
||||
@@ -141,8 +141,13 @@ final class ProductFilterPrice extends AbstractBlock {
|
||||
) = $attributes;
|
||||
|
||||
$wrapper_attributes = array(
|
||||
'data-wc-interactive' => wp_json_encode( array( 'namespace' => $this->get_full_block_name() ) ),
|
||||
'data-wc-context' => wp_json_encode( $data ),
|
||||
'data-wc-interactive' => wp_json_encode(
|
||||
array(
|
||||
'namespace' => $this->get_full_block_name(),
|
||||
),
|
||||
JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP,
|
||||
),
|
||||
'data-wc-context' => wp_json_encode( $data, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ),
|
||||
'data-has-filter' => 'no',
|
||||
);
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ final class ProductFilterRating extends AbstractBlock {
|
||||
public function get_filter_query_param_keys( $filter_param_keys, $url_param_keys ) {
|
||||
$rating_param_keys = array_filter(
|
||||
$url_param_keys,
|
||||
function( $param ) {
|
||||
function ( $param ) {
|
||||
return self::RATING_FILTER_QUERY_VAR === $param;
|
||||
}
|
||||
);
|
||||
@@ -84,8 +84,8 @@ final class ProductFilterRating extends AbstractBlock {
|
||||
/* translators: %d is the rating value. */
|
||||
'title' => sprintf( __( 'Rated %d out of 5', 'woocommerce' ), $rating ),
|
||||
'attributes' => array(
|
||||
'data-wc-on--click' => "{$this->get_full_block_name()}::actions.removeFilter",
|
||||
'data-wc-context' => "{$this->get_full_block_name()}::" . wp_json_encode( array( 'value' => $rating ) ),
|
||||
'data-wc-on--click' => esc_attr( "{$this->get_full_block_name()}::actions.removeFilter" ),
|
||||
'data-wc-context' => esc_attr( "{$this->get_full_block_name()}::" ) . wp_json_encode( array( 'value' => $rating ), JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ),
|
||||
),
|
||||
);
|
||||
},
|
||||
|
||||
@@ -45,7 +45,7 @@ final class ProductFilterStockStatus extends AbstractBlock {
|
||||
public function get_filter_query_param_keys( $filter_param_keys, $url_param_keys ) {
|
||||
$stock_param_keys = array_filter(
|
||||
$url_param_keys,
|
||||
function( $param ) {
|
||||
function ( $param ) {
|
||||
return self::STOCK_STATUS_QUERY_VAR === $param;
|
||||
}
|
||||
);
|
||||
@@ -81,12 +81,12 @@ final class ProductFilterStockStatus extends AbstractBlock {
|
||||
$action_namespace = $this->get_full_block_name();
|
||||
|
||||
$active_stock_statuses = array_map(
|
||||
function( $status ) use ( $stock_status_options, $action_namespace ) {
|
||||
function ( $status ) use ( $stock_status_options, $action_namespace ) {
|
||||
return array(
|
||||
'title' => $stock_status_options[ $status ],
|
||||
'attributes' => array(
|
||||
'data-wc-on--click' => "$action_namespace::actions.removeFilter",
|
||||
'data-wc-context' => "$action_namespace::" . wp_json_encode( array( 'value' => $status ) ),
|
||||
'data-wc-context' => "$action_namespace::" . wp_json_encode( array( 'value' => $status ), JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ),
|
||||
),
|
||||
);
|
||||
},
|
||||
@@ -168,7 +168,7 @@ final class ProductFilterStockStatus extends AbstractBlock {
|
||||
|
||||
$list_items = array_values(
|
||||
array_map(
|
||||
function( $item ) use ( $stock_statuses, $show_counts, $selected_stock_statuses ) {
|
||||
function ( $item ) use ( $stock_statuses, $show_counts, $selected_stock_statuses ) {
|
||||
$label = $show_counts ? $stock_statuses[ $item['status'] ] . ' (' . $item['count'] . ')' : $stock_statuses[ $item['status'] ];
|
||||
return array(
|
||||
'label' => $label,
|
||||
@@ -183,13 +183,13 @@ final class ProductFilterStockStatus extends AbstractBlock {
|
||||
$selected_items = array_values(
|
||||
array_filter(
|
||||
$list_items,
|
||||
function( $item ) use ( $selected_stock_statuses ) {
|
||||
function ( $item ) use ( $selected_stock_statuses ) {
|
||||
return in_array( $item['value'], $selected_stock_statuses, true );
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
$data_directive = wp_json_encode( array( 'namespace' => $this->get_full_block_name() ) );
|
||||
$data_directive = wp_json_encode( array( 'namespace' => $this->get_full_block_name() ), JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP );
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
@@ -255,7 +255,7 @@ final class ProductFilterStockStatus extends AbstractBlock {
|
||||
|
||||
return array_filter(
|
||||
$data,
|
||||
function( $stock_count ) {
|
||||
function ( $stock_count ) {
|
||||
return $stock_count['count'] > 0;
|
||||
}
|
||||
);
|
||||
|
||||
@@ -59,7 +59,7 @@ class ProductGallery extends AbstractBlock {
|
||||
|
||||
$html = array_reduce(
|
||||
$parsed_template,
|
||||
function( $carry, $item ) {
|
||||
function ( $carry, $item ) {
|
||||
return $carry . render_block( $item );
|
||||
},
|
||||
''
|
||||
@@ -134,7 +134,7 @@ class ProductGallery extends AbstractBlock {
|
||||
$p = new \WP_HTML_Tag_Processor( $html );
|
||||
|
||||
if ( $p->next_tag() ) {
|
||||
$p->set_attribute( 'data-wc-interactive', wp_json_encode( array( 'namespace' => 'woocommerce/product-gallery' ) ) );
|
||||
$p->set_attribute( 'data-wc-interactive', wp_json_encode( array( 'namespace' => 'woocommerce/product-gallery' ), JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ) );
|
||||
$p->set_attribute(
|
||||
'data-wc-context',
|
||||
wp_json_encode(
|
||||
@@ -147,7 +147,8 @@ class ProductGallery extends AbstractBlock {
|
||||
'mouseIsOverPreviousOrNextButton' => false,
|
||||
'productId' => $product_id,
|
||||
'elementThatTriggeredDialogOpening' => null,
|
||||
)
|
||||
),
|
||||
JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ class ProductGalleryLargeImage extends AbstractBlock {
|
||||
'{content}' => $content,
|
||||
'{directives}' => array_reduce(
|
||||
array_keys( $directives ),
|
||||
function( $carry, $key ) use ( $directives ) {
|
||||
function ( $carry, $key ) use ( $directives ) {
|
||||
return $carry . ' ' . $key . '="' . esc_attr( $directives[ $key ] ) . '"';
|
||||
},
|
||||
''
|
||||
@@ -143,7 +143,7 @@ class ProductGalleryLargeImage extends AbstractBlock {
|
||||
);
|
||||
|
||||
$main_image_with_wrapper = array_map(
|
||||
function( $main_image_element ) {
|
||||
function ( $main_image_element ) {
|
||||
return "<li class='wc-block-product-gallery-large-image__wrapper'>" . $main_image_element . '</li>';
|
||||
},
|
||||
$main_images
|
||||
@@ -151,7 +151,6 @@ class ProductGalleryLargeImage extends AbstractBlock {
|
||||
|
||||
$visible_main_image = array_shift( $main_images );
|
||||
return array( $visible_main_image, $main_image_with_wrapper );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -187,8 +186,8 @@ class ProductGalleryLargeImage extends AbstractBlock {
|
||||
);
|
||||
|
||||
return array(
|
||||
'data-wc-interactive' => wp_json_encode( array( 'namespace' => 'woocommerce/product-gallery' ) ),
|
||||
'data-wc-context' => wp_json_encode( $context, JSON_NUMERIC_CHECK ),
|
||||
'data-wc-interactive' => wp_json_encode( array( 'namespace' => 'woocommerce/product-gallery' ), JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ),
|
||||
'data-wc-context' => wp_json_encode( $context, JSON_NUMERIC_CHECK | JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ),
|
||||
'data-wc-on--mousemove' => 'actions.startZoom',
|
||||
'data-wc-on--mouseleave' => 'actions.resetZoom',
|
||||
);
|
||||
|
||||
@@ -129,7 +129,7 @@ class ProductGalleryLargeImageNextPrevious extends AbstractBlock {
|
||||
'{next_button}' => $next_button,
|
||||
'{alignment_class}' => $alignment_class,
|
||||
'{position_class}' => $position_class,
|
||||
'{data_wc_interactive}' => wp_json_encode( array( 'namespace' => 'woocommerce/product-gallery' ), JSON_NUMERIC_CHECK ),
|
||||
'{data_wc_interactive}' => wp_json_encode( array( 'namespace' => 'woocommerce/product-gallery' ), JSON_NUMERIC_CHECK | JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ),
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -188,7 +188,6 @@ class ProductGalleryLargeImageNextPrevious extends AbstractBlock {
|
||||
$this->get_class_suffix( $context ),
|
||||
$icon_path
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -229,6 +228,5 @@ class ProductGalleryLargeImageNextPrevious extends AbstractBlock {
|
||||
$this->get_class_suffix( $context ),
|
||||
$icon_path
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ class ProductGalleryPager extends AbstractBlock {
|
||||
</div>',
|
||||
$wrapper_attributes,
|
||||
$html,
|
||||
wp_json_encode( array( 'namespace' => 'woocommerce/product-gallery' ) )
|
||||
wp_json_encode( array( 'namespace' => 'woocommerce/product-gallery' ), JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP )
|
||||
);
|
||||
}
|
||||
return '';
|
||||
@@ -127,7 +127,10 @@ class ProductGalleryPager extends AbstractBlock {
|
||||
$p->set_attribute(
|
||||
'data-wc-context',
|
||||
wp_json_encode(
|
||||
array( 'imageId' => strval( $product_gallery_image_id ) ),
|
||||
array(
|
||||
'imageId' => strval( $product_gallery_image_id ),
|
||||
),
|
||||
JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP,
|
||||
)
|
||||
);
|
||||
$p->set_attribute(
|
||||
|
||||
@@ -168,7 +168,7 @@ class ProductGalleryThumbnails extends AbstractBlock {
|
||||
}
|
||||
}
|
||||
|
||||
$thumbnails_count++;
|
||||
++$thumbnails_count;
|
||||
}
|
||||
|
||||
return sprintf(
|
||||
@@ -178,7 +178,7 @@ class ProductGalleryThumbnails extends AbstractBlock {
|
||||
esc_attr( $classes_and_styles['classes'] ),
|
||||
esc_attr( $classes_and_styles['styles'] ),
|
||||
$html,
|
||||
wp_json_encode( array( 'namespace' => 'woocommerce/product-gallery' ) )
|
||||
wp_json_encode( array( 'namespace' => 'woocommerce/product-gallery' ), JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,12 +29,12 @@ class CheckboxList {
|
||||
$checkbox_list_context = array( 'items' => $items );
|
||||
$on_change = $props['on_change'] ?? '';
|
||||
|
||||
$namespace = wp_json_encode( array( 'namespace' => 'woocommerce/interactivity-checkbox-list' ) );
|
||||
$namespace = wp_json_encode( array( 'namespace' => 'woocommerce/interactivity-checkbox-list' ), JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP );
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
<div data-wc-interactive='<?php echo esc_attr( $namespace ); ?>'>
|
||||
<div data-wc-context='<?php echo esc_attr( wp_json_encode( $checkbox_list_context ) ); ?>' >
|
||||
<div data-wc-context='<?php echo wp_json_encode( $checkbox_list_context, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ); ?>' >
|
||||
<div class="wc-block-stock-filter style-list">
|
||||
<ul class="wc-block-components-checkbox-list">
|
||||
<?php foreach ( $items as $item ) { ?>
|
||||
|
||||
@@ -35,12 +35,12 @@ class Dropdown {
|
||||
);
|
||||
|
||||
$action = $props['action'] ?? '';
|
||||
$namespace = wp_json_encode( array( 'namespace' => 'woocommerce/interactivity-dropdown' ) );
|
||||
$namespace = wp_json_encode( array( 'namespace' => 'woocommerce/interactivity-dropdown' ), JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP );
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
<div data-wc-interactive='<?php echo esc_attr( $namespace ); ?>'>
|
||||
<div class="wc-interactivity-dropdown" data-wc-on--click="actions.toggleIsOpen" data-wc-context='<?php echo esc_attr( wp_json_encode( $dropdown_context ) ); ?>' >
|
||||
<div class="wc-interactivity-dropdown" data-wc-on--click="actions.toggleIsOpen" data-wc-context='<?php echo wp_json_encode( $dropdown_context, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ); ?>' >
|
||||
<div class="wc-interactivity-dropdown__dropdown" tabindex="-1" >
|
||||
<div class="wc-interactivity-dropdown__dropdown-selection" id="options-dropdown" tabindex="0" aria-haspopup="listbox">
|
||||
<span class="wc-interactivity-dropdown__placeholder" data-wc-text="state.placeholderText">
|
||||
@@ -118,7 +118,7 @@ class Dropdown {
|
||||
data-wc-class--is-selected="state.isSelected"
|
||||
class="components-form-token-field__suggestion"
|
||||
data-wc-bind--aria-selected="state.isSelected"
|
||||
data-wc-context='<?php echo wp_json_encode( $context ); ?>'
|
||||
data-wc-context='<?php echo wp_json_encode( $context, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ); ?>'
|
||||
>
|
||||
<?php echo $item['label']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
</div>
|
||||
|
||||
@@ -59,7 +59,8 @@ class ProductGalleryUtils {
|
||||
wp_json_encode(
|
||||
array(
|
||||
'imageId' => $product_gallery_image_id,
|
||||
)
|
||||
),
|
||||
JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php return array(
|
||||
'root' => array(
|
||||
'name' => 'woocommerce/woocommerce',
|
||||
'pretty_version' => '9.1.2',
|
||||
'version' => '9.1.2.0',
|
||||
'pretty_version' => '9.1.4',
|
||||
'version' => '9.1.4.0',
|
||||
'reference' => null,
|
||||
'type' => 'wordpress-plugin',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
@@ -167,8 +167,8 @@
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'woocommerce/woocommerce' => array(
|
||||
'pretty_version' => '9.1.2',
|
||||
'version' => '9.1.2.0',
|
||||
'pretty_version' => '9.1.4',
|
||||
'version' => '9.1.4.0',
|
||||
'reference' => null,
|
||||
'type' => 'wordpress-plugin',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -11,15 +11,15 @@ return array(
|
||||
'path' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php'
|
||||
),
|
||||
'44e8414cd27982ecf86403af6e48f123' => array(
|
||||
'version' => '9.1.2.0',
|
||||
'version' => '9.1.4.0',
|
||||
'path' => $baseDir . '/src/StoreApi/deprecated.php'
|
||||
),
|
||||
'9ce98895d0a470c71998c4b530020d26' => array(
|
||||
'version' => '9.1.2.0',
|
||||
'version' => '9.1.4.0',
|
||||
'path' => $baseDir . '/src/StoreApi/functions.php'
|
||||
),
|
||||
'c379ea42c3f5964a973a7106b08c5ef0' => array(
|
||||
'version' => '9.1.2.0',
|
||||
'version' => '9.1.4.0',
|
||||
'path' => $baseDir . '/src/Blocks/Domain/Services/functions.php'
|
||||
),
|
||||
);
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* Plugin Name: WooCommerce
|
||||
* Plugin URI: https://woocommerce.com/
|
||||
* Description: An ecommerce toolkit that helps you sell anything. Beautifully.
|
||||
* Version: 9.1.2
|
||||
* Version: 9.1.4
|
||||
* Author: Automattic
|
||||
* Author URI: https://woocommerce.com
|
||||
* Text Domain: woocommerce
|
||||
* Domain Path: /i18n/languages/
|
||||
* Requires at least: 6.4
|
||||
* Requires at least: 6.5
|
||||
* Requires PHP: 7.4
|
||||
*
|
||||
* @package WooCommerce
|
||||
|
||||
Reference in New Issue
Block a user