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 | |
// Allow shop managers to access wordpress admin | |
// WILL ONLY WORK FOR v1.3.8 and below. THIS WILL BREAK in v1.4.0. | |
add_filter( 'wcv_admin_lockout_capability', 'allow_shop_managers'); | |
function allow_shop_managers( ){ | |
return 'manage_woocommerce'; | |
} |
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
<!-- Product Type --> | |
<div class="hide_if_simple hide_if_variable hide_if_grouped"> | |
<?php WCVendors_Pro_Product_Form::product_type( $object_id ); ?> | |
</div> |
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 | |
// This code goes in your theme's functions.php | |
function form_caracteristica( $object_id ) { | |
WCVendors_Pro_Form_helper::select2( array( | |
'post_id' => $object_id, | |
'id' => 'wcv_custom_product_caracteristicas[]', | |
'class' => 'select2', | |
'label' => __('Caracteristicas', 'wcvendors-pro'), | |
'show_option_none' => __('Select a caracteristicas', 'wcvendors-pro'), |
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( 'bp_core_activated_user', 'bpdev_set_email_notifications_preference'); | |
function bpdev_set_email_notifications_preference( $user_id ) { | |
//I am putting all the notifications to no by default | |
//you can set the value to 'yes' if you want that notification to be enabled. | |
$settings_keys = array( | |
'notification_activity_new_mention' => 'no', | |
'notification_activity_new_reply' => 'no', |
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 | |
/** | |
* Only run if wcv_vendors is installed. | |
* | |
* Place this in your themes functions.php file. | |
*/ | |
if ( class_exists( 'WCV_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 | |
// You will also have to modify the store-settings.php template in templates/dashboard/store-settings.php | |
// Line 20 replace the form start with this | |
// <form method="post" action="" class="wcv-form wcv-formvalidator"> | |
//do this in the core file not an override as this was missed and I've added it to core and will be upgrade safe next time | |
// Paypal required | |
function wcv_paypal_required( $args ){ |
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
//******************************************************************************* | |
// !! CAUTION !! | |
// PROVIDED CODE WILL ONLY WORKS WHEN A CUSTOMER ORDER FROM ONLY 1 SHOP AT A TIME | |
//******************************************************************************* | |
// This code is provided as is and without any warranty | |
//Vendor can choose the minimum order amount. | |
//Vendor can choose the shipping fees for an order. | |
//Vendor can offer shipping when a certain amount order amount is reached. |
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
/* Remove Ships From in Product Meta */ | |
add_filter( 'wcv_product_ships_from', 'custom_wcv_product_ships_from' ); | |
function custom_wcv_product_ships_from( $ships_from ) { | |
$ships_from[ 'store_country' ] = ''; | |
$ships_from[ 'title' ] = ''; | |
return $ships_from; | |
} |
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
/* WC Vendors Pro - Disable International Shipping on Pro Vendor Dashboard */ | |
/* Code written by Arvid V - Thanks! */ | |
add_filter ('wcv_product_shipping_fee_international', 'ta_bort_internationell_frakt'); //Internaionell frakt, produkt | |
add_filter ('wcv_product_shipping_fee_international_qty', 'ta_bort_internationell_frakt'); //Checkruta 1, produkt | |
add_filter ('wcv_product_shipping_fee_international_disable', 'ta_bort_internationell_frakt'); //Checkruta 2, produkt | |
add_filter ('wcv_product_shipping_fee_international_free', 'ta_bort_internationell_frakt'); //Chckruta 3, produkt | |
add_filter ('wcv_shipping_international_fee', 'ta_bort_internationell_frakt'); //Internaionell frakt, butik | |
add_filter ('wcv_shipping_international_qty', 'ta_bort_internationell_frakt'); //Checkruta 1, butik | |
add_filter ('wcv_shipping_international_free', 'ta_bort_internationell_frakt'); //Checkruta 2, butik |
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_filter ( 'bp_blogs_record_post_post_types', 'activity_publish_custom_post_types',1,1 ); | |
function activity_publish_custom_post_types( $post_types ) { | |
$post_types[] = 'product'; | |
return $post_types; | |
} | |
add_filter('bp_blogs_activity_new_post_action', 'record_cpt_activity_action', 1, 3); | |
function record_cpt_activity_action( $activity_action, $post, $post_permalink ) { | |
global $bp; | |
if( $post->post_type == 'product' ) { |