: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
$isAvaialble=$product->is_purchasable() && $product->is_in_stock();
if($isAvaialble===true && !empty($args['label'])){
if(!function_exists('tb_pro_add_to_cart_text')){
function tb_pro_add_to_cart_text($text){
remove_filter('woocommerce_product_single_add_to_cart_text','tb_pro_add_to_cart_text');
remove_filter('woocommerce_product_add_to_cart_text','tb_pro_add_to_cart_text');
add_filter('woocommerce_product_add_to_cart_text','tb_pro_add_to_cart_text');
add_filter('woocommerce_product_single_add_to_cart_text','tb_pro_add_to_cart_text');
<div class="tb_pro_loop_add_to_cart tb_pro_add_to_cart<?php if(!empty($args['fullwidth']) && 'no' !== $args['fullwidth']):?> buttons-fullwidth<?php endif;?>">
if($args['quantity']!=='yes' || $isAvaialble===false){
woocommerce_template_loop_add_to_cart();
$origVal=isset($_POST['quantity'])?$_POST['quantity']:false;
woocommerce_simple_add_to_cart();
$_POST['quantity'] =$origVal;