Skip to content

Commit

Permalink
Update WooCommerce plugin from 9.4.2 to 9.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
bitpoke-bot committed Dec 4, 2024
1 parent ed3ba58 commit 883afba
Show file tree
Hide file tree
Showing 18 changed files with 1,357 additions and 1,319 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-admin-layout', 'wc-components', 'wc-csv', 'wc-currency', 'wc-customer-effort-score', 'wc-date', 'wc-experimental', 'wc-explat', 'wc-navigation', 'wc-notices', 'wc-number', 'wc-product-editor', 'wc-remote-logging', 'wc-settings', 'wc-store-data', 'wc-tracks', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url', 'wp-warning'), 'version' => '32233519c06553548425');
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-admin-layout', 'wc-components', 'wc-csv', 'wc-currency', 'wc-customer-effort-score', 'wc-date', 'wc-experimental', 'wc-explat', 'wc-navigation', 'wc-notices', 'wc-number', 'wc-product-editor', 'wc-remote-logging', 'wc-settings', 'wc-store-data', 'wc-tracks', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url', 'wp-warning'), 'version' => '427cb6704dc4d810a684');

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('version' => 'd1c3b98737eb775b3c73');
<?php return array('version' => '756b2ed79958f6462350');

Large diffs are not rendered by default.

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions wp-content/plugins/woocommerce/assets/js/frontend/add-to-cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,12 @@ jQuery( function( $ ) {

// View cart text.
if ( fragments && ! wc_add_to_cart_params.is_cart && $button.parent().find( '.added_to_cart' ).length === 0 ) {
$button.after( '<a href="' + wc_add_to_cart_params.cart_url + '" class="added_to_cart wc-forward" title="' +
wc_add_to_cart_params.i18n_view_cart + '">' + wc_add_to_cart_params.i18n_view_cart + '</a>' );
var anchor = document.createElement( 'a' );
anchor.href = wc_add_to_cart_params.cart_url;
anchor.className = 'added_to_cart wc-forward';
anchor.title = wc_add_to_cart_params.i18n_view_cart;
anchor.textContent = wc_add_to_cart_params.i18n_view_cart;
$button.after( anchor );
}

$( document.body ).trigger( 'wc_cart_button_updated', [ $button ] );
Expand Down Expand Up @@ -234,9 +238,9 @@ jQuery( function( $ ) {
if ( !message ) {
return;
}

// If the response after adding/removing an item to/from the cart is really fast,
// screen readers may not have time to identify the changes in the live region element.
// screen readers may not have time to identify the changes in the live region element.
// So, we add a delay to ensure an interval between messages.
e.data.addToCartHandler.$liveRegion
.delay(1000)
Expand All @@ -254,7 +258,7 @@ jQuery( function( $ ) {
if ( existingLiveRegion.length ) {
return existingLiveRegion;
}

return $( '<div class="widget_shopping_cart_live_region screen-reader-text" role="status"></div>' ).appendTo( 'body' );
};

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 24 additions & 22 deletions wp-content/plugins/woocommerce/i18n/languages/woocommerce.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is distributed under the same license as the WooCommerce plugin.
msgid ""
msgstr ""
"Project-Id-Version: WooCommerce 9.4.2\n"
"Project-Id-Version: WooCommerce 9.4.3\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2024-11-19T06:29:26+00:00\n"
"POT-Creation-Date: 2024-11-25T13:36:07+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.11.0\n"
"X-Domain: woocommerce\n"
Expand Down Expand Up @@ -10334,7 +10334,7 @@ msgstr ""
#: includes/admin/class-wc-admin-brands.php:648
#: includes/admin/class-wc-admin-permalink-settings.php:193
#: includes/admin/class-wc-admin-permalink-settings.php:196
#: includes/wc-core-functions.php:2188
#: includes/wc-core-functions.php:2189
#: includes/wc-update-functions.php:92
msgctxt "slug"
msgid "product"
Expand Down Expand Up @@ -10917,14 +10917,14 @@ msgid "Product attribute base"
msgstr ""

#: includes/admin/class-wc-admin-permalink-settings.php:74
#: includes/wc-core-functions.php:2189
#: includes/wc-core-functions.php:2190
#: includes/wc-update-functions.php:82
msgctxt "slug"
msgid "product-category"
msgstr ""

#: includes/admin/class-wc-admin-permalink-settings.php:83
#: includes/wc-core-functions.php:2190
#: includes/wc-core-functions.php:2191
#: includes/wc-update-functions.php:83
msgctxt "slug"
msgid "product-tag"
Expand Down Expand Up @@ -20379,6 +20379,7 @@ msgstr ""
#: includes/wc-cart-functions.php:128
#: includes/wc-template-functions.php:2316
#: src/Blocks/BlockTypes/ProductButton.php:280
#: src/Blocks/BlockTypes/ProductButton.php:281
msgid "View cart"
msgstr ""

Expand Down Expand Up @@ -30588,49 +30589,49 @@ msgstr ""
msgid "Zambian kwacha"
msgstr ""

#: includes/wc-core-functions.php:1567
#: includes/wc-core-functions.php:1568
msgctxt "Name of credit card"
msgid "MasterCard"
msgstr ""

#: includes/wc-core-functions.php:1568
#: includes/wc-core-functions.php:1569
msgctxt "Name of credit card"
msgid "Visa"
msgstr ""

#: includes/wc-core-functions.php:1569
#: includes/wc-core-functions.php:1570
msgctxt "Name of credit card"
msgid "Discover"
msgstr ""

#: includes/wc-core-functions.php:1570
#: includes/wc-core-functions.php:1571
msgctxt "Name of credit card"
msgid "American Express"
msgstr ""

#: includes/wc-core-functions.php:1571
#: includes/wc-core-functions.php:1572
msgctxt "Name of credit card"
msgid "Cartes Bancaires"
msgstr ""

#: includes/wc-core-functions.php:1572
#: includes/wc-core-functions.php:1573
msgctxt "Name of credit card"
msgid "Diners"
msgstr ""

#: includes/wc-core-functions.php:1573
#: includes/wc-core-functions.php:1574
msgctxt "Name of credit card"
msgid "JCB"
msgstr ""

#. translators: 1: class name 2: woocommerce_logging_class 3: WC_Logger_Interface
#: includes/wc-core-functions.php:2048
#: includes/wc-core-functions.php:2049
msgid "The class %1$s provided by %2$s filter must implement %3$s."
msgstr ""

#. translators: 1: wc_load_cart 2: woocommerce_init
#. translators: 1: class::method 2: plugins_loaded
#: includes/wc-core-functions.php:2561
#: includes/wc-core-functions.php:2562
#: src/Internal/Features/FeaturesController.php:555
msgid "%1$s should not be called before the %2$s action."
msgstr ""
Expand Down Expand Up @@ -40798,20 +40799,26 @@ msgstr ""
msgid "There was a problem with the provided shipping address: %s is required"
msgstr ""

#: src/StoreApi/Routes/V1/Checkout.php:475
#: src/StoreApi/Routes/V1/Checkout.php:480
msgid "Unable to create order"
msgstr ""

#: src/StoreApi/Routes/V1/Checkout.php:556
#: src/StoreApi/Routes/V1/Checkout.php:561
#: src/StoreApi/Routes/V1/CheckoutOrder.php:244
msgid "No payment method provided."
msgstr ""

#. Translators: %s Payment method ID.
#: src/StoreApi/Routes/V1/Checkout.php:570
#: src/StoreApi/Routes/V1/Checkout.php:575
msgid "%s is not available for this order—please choose a different payment method"
msgstr ""

#: src/StoreApi/Routes/V1/Checkout.php:677
#: templates/checkout/form-checkout.php:26
#: assets/client/blocks/checkout-frontend.js:1
msgid "You must be logged in to checkout."
msgstr ""

#: src/StoreApi/Routes/V1/CheckoutOrder.php:115
msgid "This order cannot be paid for."
msgstr ""
Expand Down Expand Up @@ -42212,11 +42219,6 @@ msgstr ""
msgid "Create an account?"
msgstr ""

#: templates/checkout/form-checkout.php:26
#: assets/client/blocks/checkout-frontend.js:1
msgid "You must be logged in to checkout."
msgstr ""

#: templates/checkout/form-checkout.php:54
msgid "Your order"
msgstr ""
Expand Down
4 changes: 2 additions & 2 deletions wp-content/plugins/woocommerce/includes/class-wc-cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,7 @@ public function add_to_cart( $product_id = 0, $quantity = 1, $variation_id = 0,
$message = apply_filters( 'woocommerce_cart_product_cannot_add_another_message', $message, $product_data );
$wp_button_class = wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '';

throw new Exception( sprintf( '%s <a href="%s" class="button wc-forward%s">%s</a>', $message, wc_get_cart_url(), esc_attr( $wp_button_class ), __( 'View cart', 'woocommerce' ) ) );
throw new Exception( sprintf( '%s <a href="%s" class="button wc-forward%s">%s</a>', $message, esc_url( wc_get_cart_url() ), esc_attr( $wp_button_class ), __( 'View cart', 'woocommerce' ) ) );
}
}

Expand Down Expand Up @@ -1235,7 +1235,7 @@ public function add_to_cart( $product_id = 0, $quantity = 1, $variation_id = 0,
'%s <a href="%s" class="button wc-forward%s">%s</a>',
/* translators: 1: quantity in stock 2: current quantity */
sprintf( __( 'You cannot add that amount to the cart &mdash; we have %1$s in stock and you already have %2$s in your cart.', 'woocommerce' ), wc_format_stock_quantity_for_display( $stock_quantity, $product_data ), wc_format_stock_quantity_for_display( $stock_quantity_in_cart, $product_data ) ),
wc_get_cart_url(),
esc_url( wc_get_cart_url() ),
esc_attr( $wp_button_class ),
__( 'View cart', 'woocommerce' )
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ final class WooCommerce {
*
* @var string
*/
public $version = '9.4.2';
public $version = '9.4.3';

/**
* WooCommerce Schema version.
Expand Down
11 changes: 6 additions & 5 deletions wp-content/plugins/woocommerce/includes/wc-core-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1484,14 +1484,15 @@ function wc_transaction_query( $type = 'start', $force = false ) {
* @return string Url to cart page
*/
function wc_get_cart_url() {
global $post;

// We don't use is_cart() here because that also checks for a defined constant. We are only interested in the page.
$page_id = wc_get_page_id( 'cart' );
$is_cart_page = ( $page_id && is_page( $page_id ) ) || wc_post_content_has_shortcode( 'woocommerce_cart' );
$is_cart_page = $page_id && is_page( $page_id );

if ( $is_cart_page && isset( $_SERVER['HTTP_HOST'], $_SERVER['REQUEST_URI'] ) ) {
$protocol = is_ssl() ? 'https' : 'http';
$current_url = esc_url_raw( $protocol . '://' . wp_unslash( $_SERVER['HTTP_HOST'] ) . wp_unslash( $_SERVER['REQUEST_URI'] ) );
$cart_url = remove_query_arg( array( 'remove_item', 'add-to-cart', 'added-to-cart', 'order_again', '_wpnonce' ), $current_url );
// If this isn't the cart page, but the page does contain the cart shortcode, we'll return the current page permalink.
if ( ! $is_cart_page && is_a( $post, 'WP_Post' ) && wc_post_content_has_shortcode( 'woocommerce_cart' ) ) {
$cart_url = get_permalink( $post->ID );
} else {
$cart_url = wc_get_page_permalink( 'cart' );
}
Expand Down
7 changes: 2 additions & 5 deletions wp-content/plugins/woocommerce/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: online store, ecommerce, shop, shopping cart, sell online
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 9.4.1
Stable tag: 9.4.2
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -169,12 +169,9 @@ WooCommerce comes with some sample data you can use to see how products look; im

== Changelog ==

= 9.4.2 2024-11-19 =
= 9.4.3 2024-11-25 =

**WooCommerce**

* Fix - Modify product import file check to use the WP filesystem API [#51540](https://github.com/woocommerce/woocommerce/pull/51540)
* Fix - Fix the Payments main menu item linking to a blank page when onboarding tasks are hidden [#52917](https://github.com/woocommerce/woocommerce/pull/52917)
* Fix - Improve CSV import performance by restoring the default value for `woocommerce_product_import_batch_size` [#51666](https://github.com/woocommerce/woocommerce/pull/51666)

[See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/changelog.txt).
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,12 @@ private function get_view_cart_html() {
class="added_to_cart wc_forward"
title="%2$s"
>
%2$s
%3$s
</a>
</span>',
wc_get_cart_url(),
__( 'View cart', 'woocommerce' )
esc_url( wc_get_cart_url() ),
esc_attr__( 'View cart', 'woocommerce' ),
esc_html__( 'View cart', 'woocommerce' )
);
}
}
Loading

0 comments on commit 883afba

Please sign in to comment.