Posted on

How to change “Out Of Stock” Text

If any product is out of stock and you want to display custom massage for that product, you can do that using our plugin's Filter Hook.

function codeastrology_wpto_out_of_stock_text( $add_to_cart_text_final, $settings, $column_settings, $table_ID, $product){

    $StockQ = !$product->is_in_stock();
    if( $StockQ ){
        $add_to_cart_text_final = "Out of stock Massage";
    return $add_to_cart_text_final;

add_filter( 'wpto_add_to_cart_text', 'codeastrology_wpto_out_of_stock_text', 10, 5);

Using that filter you can easily change Out of stock massage in the table. Use those code in your theme/child theme's functions.php file to manipulate out of stock massage.

Posted on

Manipulate Quantity After Add To Cart

By default in our product table quantity is 1 and when you add the product into the cart product quantity will back to 1. If you want to set product quantity 0 instead of 1, you can easily do it by using a filter hook called wpto_qty_return_zero.


Now suppose you are using one of the quantity control plugin. In that case when you add product to the cart, quantity will back to the minimum value.

But you want that quantity should be the same increment value. For example, your product minimum quantity is 2 and you increase value to 6 and then add product to cart. Now you don't want that the quantity value set back to the minimum value 2. You want quantity value remain that increase value 6.

For that we just need to use 'wpto_qty_return_quanity' filter.

Posted on

Remove Custom Taxonomy Link

If you created custom taxonomy and showing in table and you want to remove link then, use those code below.

if( !function_exists('wpt_remove_taxonomy_link') ){
	function wpt_remove_taxonomy_link(){
					$('.wpt_pa_color a,.wpt_pa_color a').contents().unwrap();
	add_action( 'wp_footer', 'wpt_remove_taxonomy_link' );

Replace (wpt_pa_color) classes with your own taxonomy classes.

Posted on

Show Table in Only Shop page

When we turn on ‘Table On Archives’ table will show on WooCommerce Archive/Category/Tag/Attribute page. But if you only want to show table on shop page, we can do this using filter hook.

if (!function_exists('wpt_show_table_only_shop')) {
	function wpt_show_table_only_shop($my_archive, $template){
			return $template;
			return $my_archive;
	add_filter('wpto_archvie_page_template_loc', 'wpt_show_table_only_shop', 10, 2);