Add to cart text is not changing
Shahjahan Jewel We want to change the add to cart button text by filter "fluent_cart/product/add_to_cart_text" on the single product page. But your JS code is preventing to do this. Your localize data script is doing this in AssetLoader class.
$localizeData = [
'fluentcart_single_product_vars' => [
'trans' => TransStrings::singleProductPageString(),
'cart_button_text' => App::storeSettings()->get('cart_button_text', ('Add to Cart', 'fluent-cart')),
'out_of_stock_button_text' => App::storeSettings()->get('out_of_stock_button_text', ('Out of Stock', 'fluent-cart')),
'in_stock_status' => Helper::IN_STOCK,
'out_of_stock_status' => Helper::OUT_OF_STOCK,
'enable_image_zoom' => (new StoreSettings())->get('enable_image_zoom_in_single_product'),
'enable_image_zoom_in_modal' => (new StoreSettings())->get('enable_image_zoom_in_modal')
]
];
Vite::enqueueAllScripts($singlePageScripts, 'fluent-cart-single-product-page', $localizeData);
Can you do something? So we can change the text with PHP code.
We will make it available on the PHP hook in the next version.