Created
January 12, 2023 14:52
-
-
Save plugin-republic/eeed82909f35e3afca32f358f4217a1f to your computer and use it in GitHub Desktop.
This file contains 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 | |
/** | |
* Filter the product price in Product Table Ultimate | |
*/ | |
function prefix_field_price_html( $price_html, $product, $args ) { | |
$price = $product->get_price(); // Just the numerical price, e.g. 4.50 | |
$price_html = wc_price( $price ); // The price formatted with currency, e.g. $4.50 | |
return $price_html; | |
} | |
add_filter( 'ptuwc_field_price_html', 'prefix_field_price_html', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment