Решено:
if (!function_exists('woocommerce_template_loop_add_to_cart')) {
function woocommerce_template_loop_add_to_cart() {
global $product;
if ( ! $product->is_in_stock() || ! $product->is_purchasable() ) return;
woocommerce_get_template('loop/add-to-cart.php');
}
}
function action_woocommerce_after_shop_loop_item() {
global $product;
if ($product->stock_status == 'instock') {
echo '<div class="my_quantity">' . $product->stock . '</div>';
} else {
echo '<div class="my_quantity">' . '<a class="xoo-wl-btn button btn" data-xoo_product_id ="'.$product->get_id().'" data-min_qty="'.$product->get_min_purchase_quantity().'" style="'.$style.'">'.__($xoo_wl_gl_bntxt_value,'waitlist-woocommerce').'Сообщить когда появиться</a>' . '</div>';
}
};
add_action( 'woocommerce_after_shop_loop_item', 'action_woocommerce_after_shop_loop_item');