我即将开发我的第一个MS Outlook加载项(关注this MS guide)。
在我创建新项目时,我看到了......
这些版本的Outlook之间真的有这样的变化吗?这是否意味着我将有两个开发我的加载项的两个副本?没有前向/后向可比性吗?
我是否遵循了正确的指南?我应该开发VSTO吗? Outlook Add-ins Team - MSFT
有一个// Woocommerce - Add user custom billing fields
// =============================================================================
function add_woocommerce_admin_billing_fields($billing_fields) {
$billing_fields['billing_birthday'] = array(
'label' => __('Datum rojstva', 'woocommerce')
);
$billing_fields['billing_socialno'] = array(
'label' => __('Davčna številka', 'woocommerce')
);
return $billing_fields;
}
add_filter('woocommerce_admin_billing_fields', 'add_woocommerce_admin_billing_fields');
function add_woocommerce_found_customer_details($customer_data, $user_id, $type_to_load) {
if ($type_to_load == 'billing') {
$customer_data[$type_to_load . 'billing_birthday'] = get_user_meta($user_id, $type_to_load . 'billing_birthday', true);
$customer_data[$type_to_load . 'billing_socialno'] = get_user_meta($user_id, $type_to_load . 'billing_socialno', true);
}
return $customer_data;
}
add_filter('woocommerce_found_customer_details', 'add_woocommerce_found_customer_details', 10, 3);
function add_woocommerce_billing_fields($billing_fields) {
$billing_fields['billing_birthday'] = array(
'type' => 'tel',
'label' => __('Datum rojstva'),
'value' => get_post_meta( $order->id, 'billing_birthday', true ),
'placeholder' => __('dd/mm/yyyy', 'placeholder'),
'pattern' => __('\d{1,2}/\d{1,2}/\d{4}', 'pattern' ),
'class' => array('form-row-first'),
'required' => true,
'clear' => true
);
$billing_fields['billing_socialno'] = array(
'type' => 'tel',
'label' => __('Davčna številka'),
'value' => get_post_meta( $order->id, 'billing_socialno', true ),
'placeholder' => _x('8-mestna številka', 'placeholder'),
'class' => array('form-row-last'),
'required' => false,
'clear' => true
);
return $billing_fields;
}
add_filter('woocommerce_billing_fields', 'add_woocommerce_billing_fields');
//Doda user meta v backend profil
function add_woocommerce_customer_meta_fields($billing_fields) {
if (isset($billing_fields['billing']['fields'])) {
$billing_fields['billing']['fields']['billing_birthday'] = array(
'label' => __('Datum rojstva', 'woocommerce'),
'description' => 'Pa kaj bo končno ratalo memo milo?'
);
$billing_fields['billing']['fields']['billing_socialno'] = array(
'label' => __('Davčna številka', 'woocommerce'),
'description' => ''
);
}
return $billing_fields;
}
add_filter('woocommerce_customer_meta_fields', 'add_woocommerce_customer_meta_fields');
function add_woocommerce_order_fields($address, $order) {
$address['billing_birthday'] = $order->billing_birthday . get_post_meta($order->id, '_billing_birthday', true) ;
$address['billing_socialno'] = $order->billing_socialno;
return $address;
}
add_filter('woocommerce_order_formatted_billing_address', 'add_woocommerce_order_fields', 10, 2);
function add_woocommerce_formatted_address_replacements($replace, $args) {
$replace['{billing_birthday}'] = !empty($args['billing_birthday']) ? 'Datum rojstva' . $args['billing_birthday'] : '';
$replace['{billing_socialno}'] = !empty($args['billing_socialno']) ? 'Davčna številka' . $args['billing_socialno'] : '';
return $replace;
}
add_filter('woocommerce_formatted_address_replacements', 'add_woocommerce_formatted_address_replacements', 10, 2);
function add_woocommerce_localisation_address_formats($formats) {
$formats['default'] = $formats['default'] . "\n{billing_birthday}\n{billing_socialno}";
return $formats;
}
add_filter('woocommerce_localisation_address_formats', 'add_woocommerce_localisation_address_formats', 10, 1);
// Change field type to tel woocommerce checkout
function bbloomer_change_checkout_field_input_type() {
echo "<script>document.getElementById('billing_postcode').type = 'tel';</script>";
echo "<script>document.getElementById('billing_birthday').type = 'tel';</script>";
}
add_action( 'woocommerce_after_checkout_form', 'bbloomer_change_checkout_field_input_type');
的答案(虽然他们的个人资料实际上并不是任何实际的MS联盟),但是从哪个开始
我们建议使用This question而不是COM 编写Outlook加载项。 Web加载项框架使开发人员成为可能 到:
编写一次,并在受支持的Outlook客户端上运行其加载项 使加载项能够覆盖数百万个Outlook桌面,Outlook for Web,Outlook for Mac和Outlook Mobile用户。
答案 0 :(得分:2)
简短的回答是否定的,2013-2016 VSTO Addin将与2010一起使用。如果您需要它与Office 2007一起使用,您将不得不添加程序集Outlook 2007 Primary Interop Assembly (PIA)。