-
-
Save octaedro/4230eac7e4395a52767392cc21778bef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Add custom product type | |
* Description: This plugin adds a product type to test PR #33755 (https://github.com/woocommerce/woocommerce/pull/33755). | |
* Version: 0.1 | |
* | |
*/ | |
function add_custom_product_type( $array ) { | |
if ( is_array( $array ) ) { | |
return array_merge( $array, array( 'my-product' => 'My product' ) ); | |
} | |
return $array; | |
} | |
add_filter( 'product_type_selector', 'add_custom_product_type',10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment