Skip to content

Commit

Permalink
fix: label improvement on subscription and order pages (#637)
Browse files Browse the repository at this point in the history
  • Loading branch information
frosso authored Jun 27, 2024
1 parent d9609cf commit a8fff2b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*** WooCommerce Subscriptions Core Changelog ***

= 7.3.0 - 2024-xx-xx =
* Fix - label improvements on subscription and order page templates.
* Fix - Fixed an issue with subscriptions containing multiple renewal orders to mark a random item as processing, instead of the last order.

= 7.2.0 - 2024-06-13 =
Expand Down
3 changes: 2 additions & 1 deletion includes/admin/meta-boxes/views/html-related-orders-row.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
?>
<tr>
<td>
<a href="<?php echo esc_url( $order->get_edit_order_url() ); ?>">
<?php // translators: placeholder is an order number. ?>
<a href="<?php echo esc_url( $order->get_edit_order_url() ); ?>" aria-label="<?php echo esc_attr( sprintf( __( 'Edit order number %s', 'woocommerce-subscriptions' ), $order->get_order_number() ) ); ?>">
<?php
// translators: placeholder is an order number.
echo sprintf( esc_html_x( '#%s', 'hash before order number', 'woocommerce-subscriptions' ), esc_html( $order->get_order_number() ) );
Expand Down
3 changes: 2 additions & 1 deletion templates/myaccount/my-subscriptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
<?php foreach ( $subscriptions as $subscription_id => $subscription ) : ?>
<tr class="order woocommerce-orders-table__row woocommerce-orders-table__row--status-<?php echo esc_attr( $subscription->get_status() ); ?>">
<td class="subscription-id order-number woocommerce-orders-table__cell woocommerce-orders-table__cell-subscription-id woocommerce-orders-table__cell-order-number" data-title="<?php esc_attr_e( 'ID', 'woocommerce-subscriptions' ); ?>">
<a href="<?php echo esc_url( $subscription->get_view_order_url() ); ?>" aria-label="<?php echo esc_attr( sprintf( __( 'View subscription number %s', 'woocommerce' ), $subscription->get_order_number() ) ) ?>">
<?php // translators: placeholder is a subscription number. ?>
<a href="<?php echo esc_url( $subscription->get_view_order_url() ); ?>" aria-label="<?php echo esc_attr( sprintf( __( 'View subscription number %s', 'woocommerce-subscriptions' ), $subscription->get_order_number() ) ) ?>">
<?php echo esc_html( sprintf( _x( '#%s', 'hash before order number', 'woocommerce-subscriptions' ), $subscription->get_order_number() ) ); ?>
</a>
<?php do_action( 'woocommerce_my_subscriptions_after_subscription_id', $subscription ); ?>
Expand Down
5 changes: 3 additions & 2 deletions templates/myaccount/related-orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @author Prospress
* @category WooCommerce Subscriptions/Templates
* @version 1.0.0 - Migrated from WooCommerce Subscriptions v2.6.2
* @version 7.3.0 - Migrated from WooCommerce Subscriptions v2.6.2
*/

if ( ! defined( 'ABSPATH' ) ) {
Expand Down Expand Up @@ -40,7 +40,8 @@

?><tr class="order woocommerce-orders-table__row woocommerce-orders-table__row--status-<?php echo esc_attr( $order->get_status() ); ?>">
<td class="order-number woocommerce-orders-table__cell woocommerce-orders-table__cell-order-number" data-title="<?php esc_attr_e( 'Order Number', 'woocommerce-subscriptions' ); ?>">
<a href="<?php echo esc_url( $order->get_view_order_url() ); ?>">
<?php // translators: placeholder is an order number. ?>
<a href="<?php echo esc_url( $order->get_view_order_url() ); ?>" aria-label="<?php echo esc_attr( sprintf( __( 'View order number %s', 'woocommerce-subscriptions' ), $order->get_order_number() ) ) ?>">
<?php echo sprintf( esc_html_x( '#%s', 'hash before order number', 'woocommerce-subscriptions' ), esc_html( $order->get_order_number() ) ); ?>
</a>
</td>
Expand Down
5 changes: 3 additions & 2 deletions templates/myaccount/related-subscriptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @author Prospress
* @category WooCommerce Subscriptions/Templates
* @version 1.0.0 - Migrated from WooCommerce Subscriptions v2.6.0
* @version 7.3.0 - Migrated from WooCommerce Subscriptions v2.6.0
*/

if ( ! defined( 'ABSPATH' ) ) {
Expand All @@ -29,7 +29,8 @@
<?php foreach ( $subscriptions as $subscription_id => $subscription ) : ?>
<tr class="order woocommerce-orders-table__row woocommerce-orders-table__row--status-<?php echo esc_attr( $subscription->get_status() ); ?>">
<td class="subscription-id order-number woocommerce-orders-table__cell woocommerce-orders-table__cell-subscription-id woocommerce-orders-table__cell-order-number" data-title="<?php esc_attr_e( 'ID', 'woocommerce-subscriptions' ); ?>">
<a href="<?php echo esc_url( $subscription->get_view_order_url() ); ?>">
<?php // translators: placeholder is a subscription number. ?>
<a href="<?php echo esc_url( $subscription->get_view_order_url() ); ?>" aria-label="<?php echo esc_attr( sprintf( __( 'View subscription number %s', 'woocommerce-subscriptions' ), $subscription->get_order_number() ) ) ?>">
<?php echo sprintf( esc_html_x( '#%s', 'hash before order number', 'woocommerce-subscriptions' ), esc_html( $subscription->get_order_number() ) ); ?>
</a>
</td>
Expand Down

0 comments on commit a8fff2b

Please sign in to comment.