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 | |
function wt_admin_show_assembly_cost_on_giftcard() { | |
?> | |
<script> | |
jQuery(document).ready(function() { | |
setTimeout(function() { | |
if(jQuery('._wt_gc_amounts_field').length){ | |
jQuery('._has_assembly_field').insertAfter('._wt_gc_amounts_field'); | |
jQuery('._disable_assembly_field').insertAfter('._wt_gc_amounts_field'); |
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 | |
function wt_ier_delete_existing_product_in_certain_category($query_args) | |
{ | |
$query_args['tax_query'][] = array( | |
'taxonomy' => 'product_cat', | |
'field' => 'slug', | |
'terms' => array('category1', 'category2', 'category3') | |
); | |
return $query_args; |
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_gc_admin_coupon_set_email_restriction', '__return_false'); |
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_gc_coupon_set_email_restriction', '__return_false'); |
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 | |
//Using the snippet, users can provide access to user roles other than admin and shop managers to access the plugin. However, the user role will need to have Wordpress dasboard access. | |
add_filter('wt_wt_import_export_for_woo_basic_alter_role_access_basic', 'wt_wt_import_export_for_woo_alter_role_access_new', 10, 1); | |
function wt_wt_import_export_for_woo_alter_role_access_new($roles) { | |
array_push($roles, 'author'); // Replace the necessary roles here. If more than one role, insert values separated by commas. | |
return $roles; | |
} |
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_id', 'wt_feed_filter_product_id', 10, 2); | |
function wt_feed_filter_product_id($sku_id, $product) { | |
$id = $product->get_id(); | |
return $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('wf_pklist_add_custom_css','wt_pklist_alter_product_image_col',10,2); | |
function wt_pklist_alter_product_image_col($custom_css,$template_type) | |
{ | |
if( 'packinglist' === $template_type ) | |
{ | |
$custom_css.='.wfte_product_image_thumb{ max-width:none !important; max-height:none !important; width:80px !important; }'; | |
} | |
return $custom_css; | |
} |
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_woomail_no_order_body_text','wbtf_add_custom_placeholder_to_user_emails',10,2); | |
function wbtf_add_custom_placeholder_to_user_emails($body_text, $email) { | |
if ( is_a( $email->object, 'WP_User' ) ) { | |
$body_text = str_replace( '{custom_value}', 'Actual data to replace', $body_text ); // Replace placeholder and value here | |
} | |
return $body_text; | |
} |
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_woomail_order_body_text','wbtf_add_custom_placeholder_to_order_emails',10,5); | |
function wbtf_add_custom_placeholder_to_order_emails($body_text, $order, $sent_to_admin, $plain_text, $email) { | |
if ( is_a( $email->object, 'WC_Order' ) && $order ) { | |
$body_text = str_replace( '{custom_data}', 'Actual data to replace', $body_text ); // Replace placeholder and value here | |
} | |
return $body_text; | |
} |
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_alter_sequence_number', 'wtsn_alter_order_number_formate',10,2); | |
if(!function_exists('wtsn_alter_order_number_formate')){ | |
function wtsn_alter_order_number_formate($sequential_order_number,$order_id){ | |
if($sequential_order_number){ | |
return 'order number:' . $sequential_order_number . ' order id:' .$order_id; | |
}else{ | |
return $order_id; | |
} |
NewerOlder