This file contains 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 //do not copy this line of code | |
add_filter('wt_pklist_alter_order_template_html','wf_pklist_alter_image_size',10,6); | |
function wf_pklist_alter_image_size($html, $template_type, $order, $box_packing, $order_package, $template_for_pdf) | |
{ | |
if($template_type == 'invoice') | |
{ | |
if(!empty($order)) | |
{ | |
$html.='<style> | |
.wfte_product_image_thumb |
This file contains 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 //Do not add this line of code | |
add_filter('wt_cli_allowed_vendor_list','wt_alter_allowed_vendor_list'); | |
function wt_alter_allowed_vendor_list($vendor_list){ | |
return array('61','755'); | |
} |
This file contains 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 //Do not copy this line of code | |
add_action('wp_footer','wt_rp_wishlist_delete_btn',10); | |
function wt_rp_wishlist_delete_btn() { | |
?> | |
<script> | |
jQuery(document).ready(function (){ | |
jQuery('.wt_frontend_wishlist_table tbody tr').each(function() { | |
var table_row = jQuery(this); |
This file contains 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 //Do not copy this line of code | |
add_filter('wt_iew_importer_skip_from_evaluation', 'wt_iew_importer_skip_from_evaluation_wpla'); | |
if(!function_exists('wt_iew_importer_skip_from_evaluation_wpla')){ | |
function wt_iew_importer_skip_from_evaluation_wpla($evl_arra) { | |
$evl_arra[] = 'order_notes'; | |
return $evl_arra; | |
} | |
} |
This file contains 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 // do not copy this line of code | |
add_filter('cli_show_cookie_bar_only_on_selected_pages', 'webtoffee_custom_selected_pages', 10, 2); | |
function webtoffee_custom_selected_pages($html, $slug) { | |
// In the eg here, the page with slug "sample-page" will be excluded from showing banner. | |
$slug_array = array('sample-page'); | |
if (in_array($slug, $slug_array)) { | |
$html = ''; | |
} |
This file contains 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 //Do not copy this line of code | |
//Export | |
add_filter('wt_iew_alter_export_data', "hf_csv_customer_post_columns",10); | |
function hf_csv_customer_post_columns ($export_data){ | |
$export_data["head_data"]["meta:wc_points_rewards_user_points_log_data"]="meta:wc_points_rewards_user_points_log_data"; | |
$export_data["head_data"]["meta:wc_points_rewards_user_points_data"]="meta:wc_points_rewards_user_points_data"; | |
return $export_data; | |
} | |
add_filter("hf_customer_csv_export_data","hf_customer_csv_export_data",10,2); | |
function hf_customer_csv_export_data($customer_data, $csv_columns){ |
This file contains 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 //Do not copy this line of code | |
//Import | |
add_filter('xa_user_impexp_alter_user_meta','xa_user_impexp_alter_user_meta_point_reward',10,3); | |
function xa_user_impexp_alter_user_meta_point_reward($found_customer, $user_meta_fields, $meta_array){ | |
global $wpdb; | |
$user_points_log_db_tablename = $wpdb->prefix . 'wc_points_rewards_user_points_log'; | |
$user_points_db_tablename = $wpdb->prefix . 'wc_points_rewards_user_points'; | |
$wpdb->hide_errors(); | |
if($wpdb->get_var("SHOW TABLES LIKE '$user_points_log_db_tablename'") != $user_points_log_db_tablename) { | |
require_once ABSPATH . 'wp-admin/includes/upgrade.php'; |
This file contains 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 //Do not copy this line of code | |
add_filter('wt_woocommerce_order_importer_pre_parse_data', 'wt_woocommerce_order_importer_pre_parse_data_to_update_comflict_orders'); | |
if(!function_exists('wt_woocommerce_order_importer_pre_parse_data_to_update_comflict_orders')){ | |
function wt_woocommerce_order_importer_pre_parse_data_to_update_comflict_orders($data){ | |
if(isset($data['mapping_fields']['order_key']) && !empty($data['mapping_fields']['order_key'])){ | |
$order_key = $data['mapping_fields']['order_key']; | |
$order_id = wc_get_order_id_by_order_key( wc_clean( wp_unslash( $order_key ) ) ); | |
if(!is_wp_Error(wc_get_order($order_id))){ | |
$data['mapping_fields']['order_id'] = $order_id; | |
} |
This file contains 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 //Do not copy this line of code | |
add_filter( 'woocommerce_related_products_columns', 'wt_rp_related_products_args' ,10,1); | |
function wt_rp_related_products_args( $column_number ) { | |
$column_number = 5; /* Modify this value based on the number of products that want to display in each row */ | |
return $column_number; | |
} |
This file contains 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 //Do not copy this line of code | |
add_filter('wt_feed_filter_product_description', 'wt_feed_filter_product_description', 10, 2); | |
function wt_feed_filter_product_description($description, $product) { | |
$description = do_shortcode($description); | |
return $description; | |
} |