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 change product price to custom declared value for international shipping. | |
* Created at : 21 Nov 2018 | |
* Updated on : 29 Nov 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
*/ | |
add_filter( 'wf_ups_shipment_confirm_request_product_details', 'wf_ups_shipment_confirm_request_product_details', 10, 2 ); | |
if( ! function_exists('wf_ups_shipment_confirm_request_product_details') ) { |
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 change product price to custom declared value and change unit of measurement for international shipping. | |
* Created at : 26 Nov 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
*/ | |
add_filter( 'wf_ups_shipment_confirm_request_product_details', 'wf_ups_shipment_confirm_request_product_details', 10, 2 ); | |
if( ! function_exists('wf_ups_shipment_confirm_request_product_details') ) { | |
function wf_ups_shipment_confirm_request_product_details( $product_details, $product_data ) { | |
if(!empty($product_data)) |
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 change fedex shipping date if it is saturday or sunday. | |
* Created at : 21 Nov 2018 | |
* Updated on : 22 Nov 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
*/ | |
add_filter( 'wf_fedex_request', 'wf_fedex_request', 10, 3 ); | |
if( ! function_exists('wf_fedex_request') ) { | |
function wf_fedex_request( $request, $order, $parcel ) { | |
if(date('l',strtotime($request['RequestedShipment']['ShipTimestamp']))=='Saturday') |
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 adjust Date Range Estimated delivery based on shipping method. | |
* Created at : 28 Nov 2018 | |
* Updated on : 04 Jan 2019 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
* Gist Link : https://gist.github.com/xadapter/983ecf750115b2c0471f55a35a57f8ef | |
*/ | |
// Adjustment on Cart and Checkout page. | |
add_filter( 'xa_estimated_delivery_cart_checkout_page_html_formatted_date', 'xa_modify_cart_page_text', 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 change cutoff time based on shipping method. | |
* Created at : 28 Nov 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
*/ | |
add_filter( 'ph_estimated_delivery_get_cutoff_time', 'ph_estimated_delivery_get_custom_cutoff_time', 10, 2 ); | |
if( ! function_exists('ph_estimated_delivery_get_custom_cutoff_time') ) { | |
function ph_estimated_delivery_get_custom_cutoff_time( $cutoff, $cur_day ) { | |
$adjustment = array( | |
'table_rate:2:1'=>array( 'mon'=>"18:00", 'tue'=>"18:00", 'wed'=>"18:00", 'thu'=>"18:00", 'fri'=>"18:00", 'sat'=>"18:00", 'sun'=>"18:00" ) |
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 change estimate delivery if product is in back order. | |
* Created at : 08 Dec 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
* Gist Link : https://gist.github.com/renjith-ph/7ea21e6c60af0bab989ed2a57e98477e | |
*/ | |
add_filter( 'woocommerce_get_availability', 'woocommerce_get_availability',12,2 ); | |
function woocommerce_get_availability( $stock_arr ,$item) { |
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 adjust rates based on package dimension. | |
* Created at : 14 Dec 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
*/ | |
add_filter('wf_ups_rate', 'wf_modify_ups_rate', 10, 2); | |
function wf_modify_ups_rate($xml, $packages){ | |
if(empty($packages)) | |
{ |
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
/** | |
* Split cart packages based on product category. | |
* Created at : 17 Dec 2018 | |
* Updated at : 19 Dec 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
*/ | |
add_filter( 'woocommerce_cart_shipping_packages', 'wf_split_cart_by_shipping_class_group' ); | |
function wf_split_cart_by_shipping_class_group($package){ |
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
/** | |
* Show hide accesspoint location based on chosen shipping methods. | |
* Created at : 18 Dec 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
*/ | |
add_action( 'wp_footer', 'conditionally_hidding_billing_custom_field' ); | |
function conditionally_hidding_billing_custom_field(){ | |
// Only on checkout page |
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 support Addon_Plugin_dividing_single_product. | |
* Created at : 24 Dec 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
*/ | |
add_filter( 'wf_fedex_commodities', 'wf_fedex_request_update_commodity', 10, 3); | |
function wf_fedex_request_update_commodity($commodities,$request,$fedex_packages) | |
{ | |
$final_product=array(); | |
if(!empty($commodities)) |
OlderNewer