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?