This file contains hidden or 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
#-- Modify the number of products column of the single store page --# | |
function single_store_page_product_columns($columns){ | |
if(dokan_is_store_page()){ | |
return $columns = 4; | |
} else { | |
return $columns; | |
} | |
} | |
add_filter( 'loop_shop_columns', 'single_store_page_product_columns'); |
This file contains hidden or 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_action( 'woocommerce_register_form', 'dokan_seller_reg_form_fields' ); | |
add_action( 'woocommerce_register_form', 'dokan_custom_reg_vendor_selected', 12 ); | |
function dokan_custom_reg_vendor_selected() { | |
$postdata = wc_clean( $_POST ); // WPCS: CSRF ok, input var ok. | |
$role = isset( $postdata['role'] ) ? $postdata['role'] : 'seller'; | |
$role_style = ( $role == 'customer' ) ? 'display:none' : ''; | |
dokan_get_template_part( 'global/seller-registration-form', '', array( | |
'postdata' => $postdata, | |
'role' => $role, |
This file contains hidden or 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
/** | |
* Dokan product page downloadable and virtual force always checked | |
*/ | |
function dokan_product_page_downloadable_virtual_checkbox_force_checked() { | |
if ( is_user_logged_in() && function_exists( 'dokan_is_seller_dashboard' ) && dokan_is_seller_dashboard() ) { | |
?> | |
<script> | |
(function($) { | |
var Dokan_Product_Virtual_Download_Checkbox_Customized = { | |
init: function() { |
This file contains hidden or 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 | |
$userID = 2; | |
$args = array( 'author' => $userID, 'post_type' => 'product', 'posts_per_page' => -1, 'post_status' => array( 'publish', 'pending', 'draft', 'future' ) ); | |
$the_query = new WP_Query( $args ); | |
// The Loop | |
if ( $the_query->have_posts() ) { | |
while ( $the_query->have_posts() ) { | |
$the_query->the_post(); | |
wp_delete_post( get_the_ID(), true ); |
OlderNewer