Created
January 30, 2024 12:58
-
-
Save codersaiful/c06e90646c5b06ec9a4ead9930edf5be to your computer and use it in GitHub Desktop.
hide-zero-price-product-from-table.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Use following code. You can use it using code snippet plugin or in your theme’s functions.php file. | |
add_action('wpt_table_row',function($Row){ | |
$price = $Row->product_data['price'] ?? 'no_price'; | |
if( empty( $price )){ | |
$Row->display = false; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment