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 Access Point name on checkout field. | |
* Created at : 11 Sep 2018 | |
* Updated at : 11 Sep 2018 | |
* PluginHive Plugins : http://www.pluginhive.com/plugins/ | |
* Gist Link : https://gist.github.com/varun-pluginhive/b048f5b225f0182211afdbc0c6d15362 | |
*/ | |
if( ! function_exists('ph_customize_access_point_name') ) { | |
function ph_customize_access_point_name( $fields ){ |
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 all ups rates apart from access point economy. If Access point has been selected. | |
* Created at : 12 Sep 2018 | |
* Updated at : 12 Sep 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/ | |
* Gist Link : https://gist.github.com/varun-pluginhive/0fff2c5a078192748aff1627756b862d | |
*/ | |
if( ! function_exists('ph_hide_ups_rates_apart_from_access_point_economy') ) { | |
function ph_hide_ups_rates_apart_from_access_point_economy( $rates ) { | |
$access_point = WC()->session->get('ph_ups_selected_access_point_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 convert the dimension in FedEx plugin. | |
* Created at : 14 Sep 2018 | |
* Updated at : 14 Sep 2018 | |
* Xadapter Plugins : https://www.pluginhive.com/plugins/ | |
* Gist Link : https://gist.github.com/varun-pluginhive/068bb9aa5b54e79973255b571d0ab629 | |
*/ | |
if( ! function_exists('ph_fedex_convert_dimension') ) { | |
function ph_fedex_convert_dimension( $converted_dimension, $dimension, $to_unit, $from_unit ) { | |
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 map woocommerce shipping method name to another name. | |
* Created at : 14 Sep 2018 | |
* Updated at : 14 Sep 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
* Gist Link : https://gist.github.com/varun-pluginhive/14fd167b4fb127a6a4b8af2513fc4fae | |
*/ | |
if( ! function_exists('ph_map_wc_shipping_method_name') ) { | |
function ph_map_wc_shipping_method_name( $shipping_rates ) { | |
$shipping_method_name_map_arr = array( |
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 WooCommerce shipping Pro rates to UPS and USPS rates. | |
* Created at : 17 Sep 2018 | |
* Updated at : 17 Sep 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
* Gist Link : https://gist.github.com/varun-pluginhive/9005d87294abf046243b3ef816185948 | |
*/ | |
if( ! function_exists('ph_add_shipping_pro_rate_to_up_or_usps_rates') ) { | |
function ph_add_shipping_pro_rate_to_up_or_usps_rates( $shipping_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
/** | |
* Snippet to change Estimated delivery text based on stock quantity. | |
* Created at : 17 Sep 2018 | |
* Updated at : 17 Sep 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
* Gist Link : https://gist.github.com/varun-pluginhive/1bdeb6c3b18a126cdae99ab92b451892 | |
*/ | |
if( ! function_exists('change_estimated_delivery_text_on_product_page') ) { | |
function change_estimated_delivery_text_on_product_page( $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 start label generation if status changed to processing from Admin. | |
* Created at : 19 Sep 2018 | |
* Updated at : 19 Sep 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
* Gist Link : https://gist.github.com/varun-pluginhive/134e7cf7743da10b7fd3fe51121275eb | |
*/ | |
if( ! function_exists('trigger_ups_label_generation') ) { | |
function trigger_label_generation_externally( $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
/** | |
* Snippet to hide Flat rate if cart amount is more than specified amount else hide Free Shipping. If the product comes with other products add the flat rate to ups and hide other rates. | |
* Created at : 20 Sep 2018 | |
* Updated at : 28 Sep 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
* Gist Link : https://gist.github.com/varun-pluginhive/2cea63276a98c1869328c1743993e4ee | |
*/ | |
if( ! empty('ph_skip_shipping_method_based_on_shipping_class') ) { | |
function ph_skip_shipping_method_based_on_shipping_class( $shipping_costs, $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
/** | |
* Snippet to sort the WooCommerce Shipping Rates in ascending order. | |
* Created at : 04 Oct 2018 | |
* Updated at : 04 Oct 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
* Gist Link : https://gist.github.com/varun-pluginhive/683bb169341200d59c4d3058d5ca06eb | |
*/ | |
add_filter( 'woocommerce_package_rates', function( $rates ){ | |
if( empty($rates) ) return $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
/** | |
* Snippet to display the Simple Date in Cart, Checkout and Thankyou page and Date Range in Product Page. | |
* Created at : 05 Oct 2018 | |
* Updated at : 05 Oct 2018 | |
* PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
* Gist Link : https://gist.github.com/varun-pluginhive/f8b76ab1d1b1e07b6a7fe26d993f1e4c | |
*/ | |
// Cart and Checkout Page | |
add_filter( 'xa_estimated_delivery_cart_checkout_page_html_formatted_date', function($html_date){ |
OlderNewer