75% comes from Bucharest, Cluj, Constanta and Prahova.
Cluj, Constanta and Prahova have far better Conversion Rate and Average Order Value, however Bucharest is setting the site-wide standard.
| <?php | |
| /* | |
| Template Name: Print Processing Orders :) | |
| */ | |
| if (!is_user_logged_in() || !current_user_can('manage_options')) wp_die('This page is private.'); | |
| ?> | |
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| /** | |
| * This code should be added to functions.php of your theme | |
| **/ | |
| add_filter('woocommerce_empty_price_html', 'custom_call_for_price'); | |
| function custom_call_for_price() { | |
| return 'Call for price'; | |
| } |
| add_filter( 'woocommerce_billing_fields', 'custom_woocommerce_billing_fields' ); | |
| function custom_woocommerce_billing_fields( $fields ) { | |
| // Over-ride a single label | |
| $fields['billing_first_name']['label'] = 'Your label'; | |
| // Over-ride a single required value | |
| $fields['billing_first_name']['required'] = false; |
| add_action('woocommerce_after_checkout_validation', 'deny_pobox_postcode'); | |
| function deny_pobox_postcode( $posted ) { | |
| global $woocommerce; | |
| // Put postcode, address 1 and address 2 into an array | |
| $check_address = array(); | |
| $check_address[] = isset( $posted['shipping_postcode'] ) ? $posted['shipping_postcode'] : $posted['billing_postcode']; | |
| $check_address[] = isset( $posted['shipping_address_1'] ) ? $posted['shipping_address_1'] : $posted['billing_address_1']; | |
| $check_address[] = isset( $posted['shipping_address_2'] ) ? $posted['shipping_address_2'] : $posted['billing_address_2']; |
| /** | |
| * Manipulate default state and countries | |
| * | |
| * As always, code goes in your theme functions.php file | |
| */ | |
| add_filter( 'default_checkout_country', 'change_default_checkout_country' ); | |
| add_filter( 'default_checkout_state', 'change_default_checkout_state' ); | |
| function change_default_checkout_country() { | |
| return 'XX'; // country code |
| /** | |
| * Add the field to the checkout | |
| **/ | |
| add_action('woocommerce_after_order_notes', 'my_custom_checkout_field'); | |
| function my_custom_checkout_field( $checkout ) { | |
| echo '<div id="my_custom_checkout_field"><h3>'.__('My Field').'</h3>'; | |
| woocommerce_form_field( 'my_field_name', array( | |
| 'type' => 'checkbox', |
| //Display currency converter widget in non widget area | |
| function custom_ccw_display_meta_end() { | |
| $instance = array(); | |
| $instance['title'] = 'Currency Converter'; | |
| $instance['show_reset'] = 'yes'; // leave empty to disable | |
| $instance['message'] = 'See the prices in your currency'; | |
| $instance['currency_codes'] = "USD"."\n"."ZAR"."\n"."EUR"; // Must use \n between currencies and between "" | |
| $args = array(); | |
| the_widget( 'WooCommerce_Widget_Currency_Converter', $instance, $args); | |
| } |
| // SSL Logo | |
| function custom_ssl_logo_head() { | |
| $str = <<<EOD | |
| <script language="javascript" type="text/javascript"> | |
| //<![CDATA[ | |
| var tl_loc0=(window.location.protocol == "https:")? "https://secure.comodo.net/trustlogo/javascript/trustlogo.js" : "http://www.trustlogo.com/trustlogo/javascript/trustlogo.js"; | |
| document.writeln('<scr' + 'ipt language="JavaScript" src="'+tl_loc0+'" type="text\/javascript">' + '<\/scr' + 'ipt>'); | |
| //]]> | |
| </script> | |
| EOD; |
| /* Sets the user's display name (always) to first name last name, when it's available ************************************** | |
| ** http://stackoverflow.com/questions/9326315/wordpress-change-default-display-name-publicy-as-for-all-existing-users *** */ | |
| /* !아이디 대신 이름으로 나타내기 ********************************************************************************************* */ | |
| /* Sets the user's display name (always) to first name last name, when it's avail. */ | |
| add_action ('admin_head','make_display_name_f_name_last_name'); | |
| function make_display_name_f_name_last_name(){ | |
| $users = get_users(array('fields'=>'all')); | |
| foreach($users as $user){ | |
| $user = get_userdata($user->ID); | |
| $display_name = $user->first_name; |