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 | |
// remove shipping column from orders table | |
add_filter( 'wcv_order_table_columns', 'remove_shipping' ); | |
function remove_shipping( $columns ){ | |
unset( $columns[ 'status' ] ); | |
return $columns; | |
} |
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( 'wcv_commissions_export_columns', 'commission_export_columns', 1 ); | |
function commission_export_columns( $columns ){ | |
$columns = array( | |
'order_id' => __( 'Order ID', 'wc-vendors' ), | |
'vendor_id' => sprintf( __( '%s', 'wc-vendors' ), wcv_get_vendor_name() ), | |
'product_id' => __( 'Product', 'wc-vendors' ), | |
'qty' => __( 'QTY', 'wc-vendors' ), |
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 | |
if ( !class_exists( 'WC_Payment_Gateway' ) ) return false; | |
/** | |
* Add the gateway to WooCommerce | |
* | |
* @access public | |
* @param array $methods | |
* @return array |
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
/* | |
The following code will create a pv_recent_products short code that is a duplicate of the internal woocommerce | |
shortcode for recent products (See : http://docs.woothemes.com/document/woocommerce-shortcodes/) but provides a | |
new attribute 'login'. This will filter the results by author allowing you to have recent products per vendor. | |
Please Note: This code relies on a 3rd party plugin from Matt Gates. (http://shop.mgates.me/shop/wc-marketing/wc-product-vendor/) | |
Usage: [pv_recent_products per_page="5" login="usernicename" ] | |
All attributes are documentent on the woocommerce docs page above. |
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 | |
/** | |
* Required Tutor LMS v.1.6.0 | |
*/ | |
add_action('tutor_new_instructor_after', 'wcv_add_vendor_role'); | |
/** | |
* @param $instructor_id | |
* |
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 | |
// Disable the product type drop down. | |
add_filter('wcv_disable_product_type', function() { return true; } ); | |
add_filter( 'wcv_product_meta_tabs', function() { return array(); } ); | |
// Adjust styles of the product tabs after removing them. | |
add_action('wp_head', 'wcv_add_custom_styles', 10); | |
function wcv_add_custom_styles() { | |
echo "<style>.tabs-nav { display: none!important;}</style>"; |
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 | |
/** | |
* Disable existing order page hook into the dashboard links filter | |
* | |
* filter: wcv_pro_dashboard_urls | |
*/ | |
add_filter( 'wcv_pro_dashboard_urls', 'wcv_remove_order_page' ); | |
function wcv_remove_order_page( $pages ){ |
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
function store_bank_details( ){ | |
if ( class_exists( 'WCVendors_Pro' ) ){ | |
$key = '_wcv_custom_settings_bankname'; | |
$value = get_user_meta( get_current_user_id(), $key, true ); | |
// Bank Name | |
WCVendors_Pro_Form_Helper::input( array( | |
'id' => $key, | |
'label' => __( 'Bank Name', 'wcvendors-pro' ), | |
'placeholder' => __( 'First Bank', 'wcvendors-pro' ), | |
'desc_tip' => 'true', |
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_action( 'wcv_after_product_type', 'wcv_checkbox_check' ); | |
function wcv_checkbox_check( $object_id ){ | |
$value = get_post_meta( $object_id, 'wcv_custom_product_checkbox3', true ); | |
WCVendors_Pro_Form_Helper::input( array( | |
'id' => 'wcv_custom_product_checkbox3', | |
'label' => __( 'Personalisation', 'wcvendors-pro' ), | |
'type' => 'checkbox', | |
'desc_tip' => true, |
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
add_action( 'wcv_after_product_simple_after', 'wcv_add_inventory_fields' ); | |
function wcv_add_inventory_fields( $object_id ){ | |
?> | |
<!-- Inventory --> | |
<div class="wcv-product-inventory inventory_product_data tabs-content" id="inventory"> | |
<?php WCVendors_Pro_Product_Form::manage_stock( $object_id ); ?> | |
<?php do_action( 'wcv_product_options_stock', $object_id ); ?> |