Updated the theme and your plugin, nothing has changed
Updated the theme and your plugin, nothing has changed
on the second question screenshot
its thanks, but now how to move to the right against the price, so that it would be the same as with the enabled setting Add to cart with quantity (screenshot)
Thanks, is it possible to square the button? It’s like it’s rectangular now, the same as when Add to cart with quantity is enabled
We did it through Loco, but it doesn’t work for some reason, that’s why we’re writing 🙂 We translated everywhere: Select, but a completely different translation remains on the button, only this hook helps:
add_filter( ‘woocommerce_product_add_to_cart_text’, ‘custom_variable_add_to_cart_text’, 10, 2 );
function custom_variable_add_to_cart_text( $text, $product ) {
if ( $product->is_type( ‘variable’ ) ) {
$text = __( ‘Выбрать’, ‘woocommerce’ ); // Новый текст
}
return $text;
}
In general, if you help solve a question from our other topic, then this one will be irrelevant if you can help make an icon instead of text: https://www.8theme.com/topic/is-it-possible-to-use-an-icon-instead-of-text-in-design-type-default-when-the-setting-add-to-cart/#post-427537
I have it done, Select options renamed, but it’s like it’s coming from your file from woo.php file and the translation is different altogether, can you somehow fix it to just “Select” ?
You wrote in the last thread that you don’t update plugins and themes yourself, I see that updated + still haven’t turned back on the part…
I don’t understand, we have folders there, I have commented (renamed) everything, but nothing has changed, what else can it be, where else to look in the child theme? All the folders that are here, in fact, created with you for the entire existence of the site…
Thanks, I’m uploading the data, it’s not working, I can’t access the favorites page on my mobile.
If you have a different solution and a better one, I would be very happy!
We got 2 codes:
// Remove text output for screen-reader.
add_filter(‘woocommerce_get_price_html’, ‘remove_screen_reader_text_from_prices’, 10, 2);
function remove_screen_reader_text_from_prices($price, $product) {
// Remove screenreader text using a regular expression.
$price = preg_replace(‘/.*?<\/span>/’, ”, $price);
return $price;
}
add_filter( ‘woocommerce_loop_add_to_cart_args’, ‘clear_success_message_attribute’, 10, 2 );
function clear_success_message_attribute( $args, $product ) {
// Clear the contents of the data-success_message attribute.
if ( isset( $args[‘attributes’][‘data-success_message’] ) ) ) {
$args[‘attributes’][‘data-success_message’] = ”; // Empty value.
}
return $args;
}
and it seems to work, will it harm the site?
This is the solution neuron offered us in function:
// Remove text output for screen-reader.
add_filter(‘woocommerce_get_price_html’, ‘remove_screen_reader_text_from_prices’, 10, 2);
function remove_screen_reader_text_from_prices($price, $product) {
// Remove screenreader text using a regular expression.
$price = preg_replace(‘/.*?<\/span>/’, ”, $price);
return $price;
}
It kind of removes the piece, but still in the card pulls texts like: “ data-product_sku=”56777“ rel=”nofollow“ data-success_message=”“A set of balls "Cream Heart"” added to your cart“>” Why they have all this, I do not understand, I do not even know what to do, rollback, but is it safe?
screen
I just wrote in the last thread that there were errors in the button, you solved the problem and the plugin was updated, I have not updated it specifically for probably half a year:)
Anyway, maybe you can help here? So that I don’t rollback, but update as it should be further? I don’t know what the file code was before, but I know for sure that removing the code here is what you seem to have done for me in past threads:
//label class=“screen-reader-text” for=“”> in quantity-input.php//
everything worked fine. I.e. we apparently removed all this unnecessary stuff from the code via screen-reader-text, a bunch of garbage in the code, which throws us off the whole relevance of the document type:
//span class=“screen-reader-text”//The original price was, Current price: 2990 ₽.// all this style is not needed absolutely, the file itself quantity-input.php is not large, can you tell me what can be commented or changed?
I don’t even know what version you had, you updated our Woocomerce plugin.
Thank you, I have corrected all the errors in loco
Everything has been updated, nothing has changed, there is no icon for the button
Where are the font files in general? I can’t find the path to add local fonts to WP Rocket preloading
Now it’s like this, but the error from the console hasn’t disappeared for some reason
and it seems to be a problem only on iphones.
Thank you, that’s what we did
Maybe that’s what’s causing the problem. Basically on the site we only use Monserat regular kind of thing.
Maybe here?
Ok, we added the font to WP Rocket, also on the hosting for some reason there are a lot of the same font files, maybe we need to do something here too?
Let’s do it again, please, we’re not clear on what to do. In this thread you recommended us to connect fonts locally: https://www.8theme.com/topic/is-it-possible-to-make-fonts-local-on-the-server/#post-393021 to optimize the site, now it has caused a base growth problem and is negatively affecting the site, do I understand correctly? Maybe then it’s easier for us to use google font as before and that will solve the problem? Or do we need to put your code in function after all?
ђ
I am observing the problem from Safari browser on 13 afyon, I will check with staff tomorrow, also some have this….
About the first point did not do anything like that, we only use your theme, but I think it might be related to your help earlier maybe? Earlier you helped us with styles in style.css and a number of files with edits that replaced the icon with the word “Buy” instead of the icon, now we have returned back, maybe there is something not finished.
Translated with DeepL.com (free version)
They threw it off again
I’m sorry, I do not know what to choose, I thought local fonts on the contrary speed up the site, but it turns out that it is on the contrary becomes heavier? The second code if I put, something will change on the site? Will it become slower or faster?
then the code above doesn’t need to be put anywhere? Isn’t it something to do with fonts? We have it added locally, maybe we did something wrong.
It turned out that you had to Click Sync in Loco and everything appeared, thank you!