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
/** | |
* Snippet to hide multicarrier shipping fallback rates if any other multicarrier rates are being shown. This will work when fallback rate is based on per unit quantity. | |
* Created at : 03 Aug 2018 | |
* Updated at : 03 Aug 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
* Gist Link : https://gist.github.com/xadapter/ba600aa9fbf72b5409cf64493070c45b | |
*/ | |
add_filter( 'woocommerce_package_rates', 'ph_hide_mc_fallback_rates', 10, 2 ); | |
if( ! function_exists('ph_hide_mc_fallback_rates') ) { |
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
//Change the color of text "pick Please a booking period" here. | |
.callender-msg{ | |
color:white; | |
} | |
//Change the color of the calendar here. | |
.ph-calendar-month{ | |
background:red; | |
} |
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
/** | |
* Snippet to add Company Logo in top of UPS label in zpl format. | |
* Created at : 01 Aug 2018 | |
* Updated at : 01 Aug 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
* Gist Link : https://gist.github.com/xadapter/90f6b1f63b67fd4ef596b35adc940314 | |
*/ | |
if( ! function_exists('ph_generate_document_file') ) { | |
function ph_generate_document_file($content, $file_name){ |
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
/** | |
* Snippet to send estimated delivery on top to admin for new order and to customer for processing order status. | |
* Created at : 30 July 2018 | |
* Updated at : 30 July 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
* Gist Link : https://gist.github.com/xadapter/9a20d5f173498dd8a68074d4b87dafb1 | |
*/ | |
add_action( 'woocommerce_email_order_details', 'ph_add_estimated_delivery_after_heading', 1, 4 ); |
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
/** | |
* Snippet to update PO Number, Invoice Number and Recipient Tax number. | |
* Created at : 30 July 2018 | |
* Updated at : 06 Aug 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
* Gist Link : https://gist.github.com/xadapter/f471f8266b21d68720c4d4d474e468bd | |
*/ | |
add_filter('wf_fedex_request','wf_fedex_label_request_reff_callback', 10, 2 ); | |
function wf_fedex_label_request_reff_callback($request,$order){ | |
$po_number = $order->get_meta('customer_po'); // Give Purchase Order here |
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
/** | |
* Snippet to hide normal shipping methods based if any freight shipping class in cart else hide freight shipping method if any normal shipping class product in cart. | |
* Created at : 27 July 2018 | |
* Updated at : 27 July 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
* Gist Link : https://gist.github.com/xadapter/0504f1442d9c21d7014543bfc7589f78 | |
*/ | |
add_filter( 'woocommerce_package_rates', 'ph_hide_shipping_method_based_on_shipping_class', 10, 2 ); |
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
/** | |
* Snippet to show the notice message on Cart and Checkout if any particular word found in Address line one and two. | |
* Created at : 24 July 2018 | |
* Updated at : 24 July 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
* Gist Link : | |
*/ | |
add_filter( 'woocommerce_package_rates', 'ph_add_notice_if_po_box_addresses', 10, 2 ); | |
if( ! function_exists('ph_add_notice_if_po_box_addresses') ) { |
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
/** | |
* Snippet to hide text from Woocommerce stock availability on product page. | |
* Created at : 23 July 2018 | |
* Updated at : 23 July 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
* Gist Link : https://gist.github.com/xadapter/c16bd38ec7aa11c59b6cd176218b38e2 | |
*/ | |
add_filter( 'woocommerce_get_availability', function( $stock_arr ){ |
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
/** | |
* Snippet to display last live tracking status on woocommerce->Order page. Display only for UPS, USPS and FedEx. | |
* Created at : 20 July 2018 | |
* Updated at : 20 July 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
* Gist Link : https://gist.github.com/xadapter/9fa56cff0857bcb71b7bd49d2101cacd | |
*/ | |
// Add columns to the order list | |
add_filter( 'manage_edit-shop_order_columns', function($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
/** | |
* Snippet to update live tracking status from backend for specified number of previous days. To trigger the manual update go to Woocommerce->Orders page and add &update_tracking_manually=yes in url and press enter. | |
* Created at : 20 July 2018 | |
* Updated at : 20 July 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
* Gist Link : https://gist.github.com/xadapter/e86aac0f4e7381c3533373ae7f6edc12 | |
*/ | |
add_action( 'init', 'ph_update_live_tracking_status', 100 ); | |
function ph_update_live_tracking_status() { |