Created
May 28, 2015 03:01
-
-
Save digitalchild/16baaa9da4eeaf13e05f to your computer and use it in GitHub Desktop.
Pseudo Code for removing a product type.
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 | |
add_filter( 'product_type_selector', 'remove_listing_package'); | |
// $product type is an array of product it containts the following: | |
// | |
// $product_type_selector = apply_filters( 'product_type_selector', array( | |
// 'simple' => __( 'Simple product', 'wcvendors-pro' ), | |
// 'grouped' => __( 'Grouped product', 'wcvendors-pro' ), | |
// 'external' => __( 'External/Affiliate product', 'wcvendors-pro' ), | |
// 'variable' => __( 'Variable product', 'wcvendors-pro' ) | |
// ), $product_type ); | |
// | |
function remove_listing_package($product_type) { | |
if ( WCV_Vendors::is_vendor( get_current_user_id() ) ) { | |
//unset the array index for listing_package (whatever that is. ) | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment