Skip to content

Instantly share code, notes, and snippets.

@bhavik-kiri
Last active November 6, 2017 02:13
Show Gist options
  • Save bhavik-kiri/a0e993f3c72b2c60ed0b04c5c9110fa5 to your computer and use it in GitHub Desktop.
Save bhavik-kiri/a0e993f3c72b2c60ed0b04c5c9110fa5 to your computer and use it in GitHub Desktop.
<?php
add_filter( 'product_type_selector', 'wcpt_add_gift_card_type' );
function wcpt_add_gift_card_type ( $type ) {
// Key should be exactly the same as in the class product_type
$type[ 'gift_card' ] = __( 'Gift Card' );
return $type;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment