Dokan
Export Dokan seller information
Follow to article.
1. Put PHP code in section “Misc Settings”
2. You can add these keys
- dokan_store_name
- dokan_phone
- dokan_address_street_1
- dokan_address_street_2
- dokan_address_city
- dokan_address_state
- dokan_address_zip
- dokan_address_country
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
add_filter( 'woe_fetch_order_product', function($row, $order, $item, $product, $item_meta ) { $user_id = $product->post->post_author; if($user_id) { $data = get_user_meta($user_id,"dokan_profile_settings", true); if( $data ) { foreach($row as $k=>$v) { if(preg_match("#^dokan_(.+)$#",$k,$m)) { $d_key = $m[1]; if(preg_match("#^address_(.+)$#",$d_key,$m) ) $d_val = $data['address'][$m[1]]; else $d_val = $data[$d_key]; $row[$k] = $d_val; } // endif dokan key } }//endif $data } return $row; },10,5); |