Skip to content

Instantly share code, notes, and snippets.

@plugin-republic
Created January 12, 2023 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plugin-republic/eeed82909f35e3afca32f358f4217a1f to your computer and use it in GitHub Desktop.
Save plugin-republic/eeed82909f35e3afca32f358f4217a1f to your computer and use it in GitHub Desktop.
<?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