Please install and activate the supplied child theme, inside the child theme functions.php
file paste this and change “Sold out”.
/* PRODUCT BADGE
================================================== */
if ( ! function_exists( 'nota_woo_product_badge' ) ) {
function nota_woo_product_badge() {
global $product, $post;
$nota_options = nota_get_theme_opts();
$postdate = get_the_time( 'Y-m-d' ); // Post date
$postdatestamp = strtotime( $postdate ); // Timestamped post date
$newness = $nota_options['new_badge']; // Newness in days
$percentage_off = sf_product_get_sale_percent( $product->id );
$extra_class = $out = $percentage_off = "";
if ( nota_is_out_of_stock() || $product->is_on_sale() || ( time() - ( 60 * 60 * 24 * $newness ) ) < $postdatestamp || $product->get_price() != "" && $product->get_price() == 0 ) {
if ( nota_is_out_of_stock() ) {
$out .= '<span class="out-of-stock-badge">' . esc_html__( 'Sold out', 'nota' ) . '</span>';
$extra_class = "sf-out-of-stock";
} else if ( $product->is_on_sale() ) {
$out .= apply_filters('woocommerce_sale_flash', '<span class="onsale">'.esc_html__( 'Sale', 'nota' ).'</span>', $post, $product);
$extra_class = "sf-on-sale";
} else if ( ( time() - ( 60 * 60 * 24 * $newness ) ) < $postdatestamp ) {
// If the product was published within the newness time frame display the new badge
$out .= '<span class="wc-new-badge">' . esc_html__( 'New', 'nota' ) . '</span>';
$extra_class = "sf-new-stock";
} else if ( $product->get_price() != "" && $product->get_price() == 0 ) {
$out .= '<span class="free-badge">' . esc_html__( 'Free', 'nota' ) . '</span>';
$extra_class = "sf-free-stock";
}
echo '<div class="badge-wrap ' . esc_attr( $extra_class ) . '">' . $out;
echo '</div>';
}
}
}