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
| add_filter('wf_alter_billing_address_label','wt_alter_billing_address_label',10,1); | |
| function wt_alter_billing_address_label($text){ | |
| return $text = 'Shipping Address'; | |
| } |
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
| add_filter('wf_pklist_modify_shipping_address','wt_pklist_modify_shipping_address',10, 3); | |
| function wt_pklist_modify_shipping_address($address, $order, $document_type){ | |
| if($document_type=='dispatchlabel'){ | |
| ?> | |
| <style> | |
| #wf_shipping_address_title_main{ | |
| display: none; |
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
| add_filter('wf_alter_shipping_from_address','wt_alter_shipping_from_address',10, 3); | |
| function wt_alter_shipping_from_address($address, $document_type, $order){ | |
| if($document_type=='dispatchlabel'){ | |
| $order_id = (WC()->version < '2.7.0') ? $order->id : $order->get_id(); | |
| $fromaddress = array(); | |
| $countries = new WC_Countries; | |
| $shipping_country = get_post_meta($order_id, '_shipping_country', true); |
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
| // Convert Dispatch Label into a Return Label | |
| add_filter('wf_pklist_modify_billing_address','wt_pklist_modify_billing_address',10, 3); | |
| function wt_pklist_modify_billing_address($address, $order, $document_type){ | |
| if($document_type=='dispatchlabel'){ | |
| $billing_address['first_name'] = stripslashes(get_option('woocommerce_wf_packinglist_sender_name')); | |
| $billing_address['last_name'] = ''; |
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_filter('wt_iew_alter_export_data', 'wt_iew_alter_export_booking_data', 10, 6); | |
| function wt_iew_alter_export_booking_data($export_data, $offset, $is_last_offset, $file_as, $to_export, $csv_delimiter) { | |
| if ($to_export == 'order') { | |
| if (isset($export_data['head_data'])) { | |
| $export_data['head_data']['meta:booking_items'] = 'meta:booking_items'; | |
| } | |
| if (isset($export_data['body_data'])) { | |
| foreach ($export_data['body_data'] as $ord_key => $ord_value) { |
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
| add_filter('wf_pklist_add_custom_css','wt_pklist_add_custom_css_to_addresslabel',10,2); | |
| function wt_pklist_add_custom_css_to_addresslabel($custom_css,$template_type) | |
| { | |
| if($template_type=='addresslabel') | |
| { | |
| $custom_css.='.wfte_addr_col { font-size:18px; border:none; }'; | |
| } | |
| return $custom_css; | |
| } |
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
| global $wpdb; | |
| if(!empty($_GET['mark-license-migration-update'])){ | |
| $new_order_from_wf = $wpdb->get_results("SELECT post_id FROM ".$wpdb->postmeta." WHERE meta_key = '_wt_import_key'"); | |
| foreach ($new_order_from_wf as $xa_order) { | |
| //$xa_order->post_id = 20635; | |
| $order_key = $wpdb->get_row("SELECT * FROM ".$wpdb->postmeta." WHERE meta_key = '_order_key' AND post_id = $xa_order->post_id"); // This query is not returning order key from server but this is running in local | |
| $order_key_xa = $order_key->meta_value; |
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
| /* add 'save & accept' button to settings popup using GDPR Cookie Consent plugin:::::start */ | |
| function cli_script_patch() | |
| { | |
| ?> | |
| <script type="text/javascript"> | |
| jQuery(document).ready(function(){ | |
| setTimeout(function(){ | |
| var cli_popup_row=jQuery('.cli-row'); | |
| cli_popup_row.append('<div class="cli_popup_footer"></div>'); | |
| var cli_popup_footer=jQuery('.cli_popup_footer'); |
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
| /* CLI bar as popup start */ | |
| add_action( 'wp_head', 'cookie_law_info_bar_as_popup' ); | |
| function cookie_law_info_bar_as_popup() | |
| { | |
| ?> | |
| <script type="text/javaScript"> | |
| function cookie_law_info_bar_as_popup() | |
| { |
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
| function wt_readmore_link_change_settings($settings) { | |
| if($settings['button_x_text'] == 'Read More'){ | |
| $settings['button_x_url'] = 'https://www.webtoffee.com/'; | |
| } | |
| if($settings['button_x_text'] == 'Weiterlesen'){ | |
| $settings['button_x_url'] = 'https://www.webtoffee.com/de'; | |
| } |