| @@ -196,9 +196,11 @@ | ||
| 196 | 196 | |
| 197 | 197 | public function renderTitles() |
| 198 | 198 | { |
| 199 | 199 | $postTitle = Arr::get($this->currentCartItem, 'post_title', ''); |
| 200 | - $variationTitle = Arr::get($this->currentCartItem, 'title', ''); | |
| 200 | + // The Cart model already resolves & appends variation_display_title on | |
| 201 | + // every cart item (Cart::getCartDataAttribute), so just read it. | |
| 202 | + $variationTitle = (string) Arr::get($this->currentCartItem, 'variation_display_title', Arr::get($this->currentCartItem, 'title', '')); | |
| 201 | 203 | $variationType = Arr::get($this->currentCartItem, 'variation_type', 'simple'); |
| 202 | 204 | |
| 203 | 205 | $aria_label = sprintf( |
| 204 | 206 | /* translators: 1: Post or product title */ |
| @@ -401,9 +403,17 @@ | ||
| 401 | 403 | class="fct-cart-total-wrapper" |
| 402 | 404 | role="region" |
| 403 | 405 | aria-label="<?php esc_attr_e('Cart Total', 'fluent-cart'); ?>" |
| 404 | 406 | > |
| 405 | - <span><?php echo esc_html__('Total', 'fluent-cart'); ?>:</span> | |
| 407 | + <span><?php | |
| 408 | + /** | |
| 409 | + * Filters the cart total label. Lets a caller relabel it without | |
| 410 | + * reimplementing this markup; the default renders exactly as before. | |
| 411 | + * | |
| 412 | + * @param string $label | |
| 413 | + */ | |
| 414 | + echo esc_html(apply_filters('fluent_cart/cart/total_label', __('Total', 'fluent-cart'))); | |
| 415 | + ?></span> | |
| 406 | 416 | <span |
| 407 | 417 | data-fluent-cart-cart-total-price |
| 408 | 418 | aria-live="polite" |
| 409 | 419 | aria-label="<?php echo esc_attr($aria_label); ?>" |
| @@ -446,13 +456,21 @@ | ||
| 446 | 456 | public function renderCheckoutButton() |
| 447 | 457 | { |
| 448 | 458 | ?> |
| 449 | 459 | |
| 450 | - <a class="checkout-button" | |
| 460 | + <a class="checkout-button fct-primary-btn" | |
| 451 | 461 | href="<?php echo esc_attr($this->storeSettings->getCheckoutPage()); ?>" |
| 452 | 462 | role="button" |
| 453 | 463 | aria-label="<?php esc_attr_e('Go to checkout page', 'fluent-cart'); ?>"> |
| 454 | - <?php esc_html_e('Go to Checkout', 'fluent-cart'); ?> | |
| 464 | + <?php | |
| 465 | + /** | |
| 466 | + * Filters the cart checkout button text. Lets a caller relabel it | |
| 467 | + * without reimplementing this markup; the default is unchanged. | |
| 468 | + * | |
| 469 | + * @param string $text | |
| 470 | + */ | |
| 471 | + echo esc_html(apply_filters('fluent_cart/cart/checkout_button_text', __('Go to Checkout', 'fluent-cart'))); | |
| 472 | + ?> | |
| 455 | 473 | </a> |
| 456 | 474 | |
| 457 | 475 | <?php |
| 458 | 476 | |