Skip to content

Instantly share code, notes, and snippets.

@marcusig
Created January 17, 2022 14:29
Show Gist options
  • Save marcusig/2fa017e88144cee1a7a294e66085c378 to your computer and use it in GitHub Desktop.
Save marcusig/2fa017e88144cee1a7a294e66085c378 to your computer and use it in GitHub Desktop.
Add SKU to the choice button
<?php
add_filter( 'tmpl-pc-configurator-choice-item-label', function( $label ) {
return $label . ' <# if ( data.sku ) { #><span class="sku">{{data.sku}}</span><# } #>';
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment