Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Show product sold count
- add_action( 'woocommerce_single_product_summary', ‘claue_product_sold_count', 11 );
- function claue_product_sold_count() {
- global $product;
- $units_sold = $product->get_total_sales();
- if ( $units_sold ) echo '<p>' . sprintf( __( 'Sold: %s', ‘claue' ), $units_sold ) . '</p>';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement