Skip to content

Instantly share code, notes, and snippets.

View byronrode's full-sized avatar

Byron Rode byronrode

View GitHub Profile
Verifying that +byronrode is my blockchain ID. https://onename.com/byronrode
@byronrode
byronrode / add-sup-decimals.woocommerce.php
Created August 29, 2015 11:39
Add <sup></sup> wrapper around decimals for WooCommerce prices.
<?php
add_filter( 'woocommerce_get_price_html', 'themeprefix_add_sup_decimals_to_pricing' );
if(!function_exists( 'themeprefix_add_sup_decimals_to_pricing' )){
function themeprefix_add_sup_decimals_to_pricing( $price )
{
if(!is_admin()){ // Check that we're not in the admin
$price = strip_tags($price);
$price_exploded = explode('&ndash;', $price);
if(count($price_exploded) > 1) { // Variable Pricing

Keybase proof

I hereby claim:

  • I am byronrode on github.
  • I am byronrode (https://keybase.io/byronrode) on keybase.
  • I have a public key whose fingerprint is D3BC F6AB A7F5 7A18 F532 ACD9 66DC A89E 5D46 E39A

To claim this, I am signing this object: