PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.5
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.5
1.6.6 1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 All 49 releases
← All changes | app/Services/Renderer/CartRenderer.php +22 -14 1.5.1 → 1.6.5 View file →
@@ -5,9 +5,8 @@
5 5 use FluentCart\Api\StoreSettings;
6 6 use FluentCart\Framework\Support\Arr;
7 7 use FluentCart\App\Vite;
8 8 use FluentCart\App\Helpers\Helper;
9 -use FluentCart\App\Helpers\AttributeHelper;
10 9 use FluentCart\App\Helpers\CartCheckoutHelper;
11 10 use FluentCart\App\Models\Product;
12 11
13 12 class CartRenderer
@@ -197,20 +196,13 @@
197 196
198 197 public function renderTitles()
199 198 {
200 199 $postTitle = Arr::get($this->currentCartItem, 'post_title', '');
201 - $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', ''));
202 203 $variationType = Arr::get($this->currentCartItem, 'variation_type', 'simple');
203 204
204 - // Prefer the labeled attribute combination when the item has a snapshot.
205 - $itemAttributes = (array) Arr::get($this->currentCartItem, 'other_info.item_attributes', []);
206 - if ($itemAttributes) {
207 - $attributesText = AttributeHelper::getDisplayAttributesString($itemAttributes, $this->currentCartItem, 'cart');
208 - if ($attributesText !== '') {
209 - $variationTitle = $attributesText;
210 - }
211 - }
212 -
213 205 $aria_label = sprintf(
214 206 /* translators: 1: Post or product title */
215 207 esc_attr__('View %1$s', 'fluent-cart'),
216 208 esc_attr($postTitle)
@@ -411,9 +403,17 @@
411 403 class="fct-cart-total-wrapper"
412 404 role="region"
413 405 aria-label="<?php esc_attr_e('Cart Total', 'fluent-cart'); ?>"
414 406 >
415 - <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>
416 416 <span
417 417 data-fluent-cart-cart-total-price
418 418 aria-live="polite"
419 419 aria-label="<?php echo esc_attr($aria_label); ?>"
@@ -456,13 +456,21 @@
456 456 public function renderCheckoutButton()
457 457 {
458 458 ?>
459 459
460 - <a class="checkout-button"
460 + <a class="checkout-button fct-primary-btn"
461 461 href="<?php echo esc_attr($this->storeSettings->getCheckoutPage()); ?>"
462 462 role="button"
463 463 aria-label="<?php esc_attr_e('Go to checkout page', 'fluent-cart'); ?>">
464 - <?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 + ?>
465 473 </a>
466 474
467 475 <?php
468 476