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 | |
add_action( 'dokan_seller_meta_fields', 'dokan_load_store_seo_field_in_admin', 10 ); | |
add_action( 'dokan_process_seller_meta_fields', 'dokan_process_seller_seo_data', 10 ); | |
function dokan_load_store_seo_field_in_admin( $user ) { | |
$seo = new Dokan_Pro_Store_Seo(); | |
$seller_profile = dokan_get_store_info( $user->ID ); | |
$seo_meta = isset( $seller_profile['store_seo'] ) ? $seller_profile['store_seo'] : array(); |
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 | |
// Add this actions | |
add_action( 'user_new_form', 'add_seller_store_field', 10 ); | |
add_action( 'edit_user_created_user', 'add_shop_url_for_seller' , 10, 2); | |
// Add this filter | |
add_filter( 'user_profile_update_errors', 'check_fields_add_new_user', 10, 3 ); | |
function add_shop_url_for_seller( $user_id, $notify ) { | |
if ( ! $user_id ) { | |
return; |
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 | |
//Add new shortcodes | |
add_filter( 'sat_sms_get_order_shortcodes', function( $codes ) { | |
$codes[] = '[order_pdf_voucher]'; | |
return $codes; | |
} ); | |
// For displaying your shortcoders in backend settings | |
add_filter( 'sat_sms_shortcode_insert_description', function( $content ) { |
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 | |
/* Booth news field seller settings */ | |
add_filter( 'dokan_settings_form_bottom', 'extra_fields', 10, 2); | |
function extra_fields( $current_user, $profile_info ){ | |
$booth_news= get_user_meta( $current_user, 'booth_news', true ); | |
$about_us= get_user_meta( $current_user, 'about_us', true ); | |
?> | |
<div class="gregcustom dokan-form-group"> |
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 | |
register_activation_hook( __FILE__, 'plugin_activate' ); | |
function plugin_activate() { | |
global $wpdb; | |
$table_name = $wpdb->prefix . 'wpems_class'; | |
$sql = "CREATE TABLE IF NOT EXISTS {$table_name} ( | |
`id` int(11) unsigned NOT NULL AUTO_INCREMENT, | |
`class_name` varchar(255) DEFAULT NULL, |
NewerOlder