This file contains hidden or 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 ShipTimeStamp based on Current Time in FedEx Rate Request. | |
| * Created at : 03 Dec 2018 | |
| * Updated at : 03 Dec 2018 | |
| * PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
| * Gist Link : https://gist.github.com/varun-pluginhive/95a643f265b2ea2dfd84fd7194c79394 | |
| */ | |
| add_filter( 'xa_fedex_rate_request', function( $request ) { | |
| $current_wp_time = date_create(current_time('c',false)); |
This file contains hidden or 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 CodeCanyon WooCommerce Currency Switcher. Note - In Plugin Settings Currency should be set to the fedex account country. No need of Conversion rate. | |
| * Created at : 01 Dec 2018 | |
| * Updated at : 01 Dec 2018 | |
| * PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
| * Gist Link : https://gist.github.com/varun-pluginhive/314791bd8f864075e43b857feb1e0c72 | |
| */ | |
| // Rate Request | |
| add_filter( 'xa_fedex_rate_request', function( $request ){ |
This file contains hidden or 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 | |
| /** | |
| * Custom code shortcode | |
| * | |
| * This template can be overridden by copying it to yourtheme/woocommerce_email_cuztomizer_with_drag_and_drop_builder/woo_mail/custom_code.php. | |
| * @var $order WooCommerce order | |
| * @var $email_id WooCommerce email id (new_order, cancelled_order) | |
| * @var $sent_to_admin WooCommerce email send to admin | |
| * @var $plain_text WooCommerce email format | |
| * @var $email WooCommerce email object |
This file contains hidden or 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 Destination Country in UPS confirm request. | |
| * Created at : 16 Nov 2018 | |
| * Updated at : 16 Nov 2018 | |
| * PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
| * Gist Link : https://gist.github.com/varun-pluginhive/3b56ce74f7dcd9af9282a6e7c7484fa7 | |
| */ | |
| add_filter( 'wf_ups_shipment_confirm_request_data', function( $request ){ | |
| $request['Shipment']['ShipTo']['Address']['CountryCode'] = 'US'; | |
| return $request; |
This file contains hidden or 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 provide minimum package weight in FedEx Rate Request. | |
| * Created at : 13 Nov 2018 | |
| * Updated at : 13 Nov 2018 | |
| * PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
| * Gist Link : https://gist.github.com/varun-pluginhive/42b90d1a70c8f85128b417ee5ebb99bf | |
| */ | |
| add_filter( 'xa_fedex_rate_request', function($request){ | |
| $packaging_types = array( 'FEDEX_ENVELOPE' ); // Packaging Type |
This file contains hidden or 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 display error message on checkout depending on Specified criteria. | |
| * Created at : 10 Nov 2018 | |
| * Updated at : 13 Nov 2018 | |
| * PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
| * Gist Link : https://gist.github.com/varun-pluginhive/930abedc8acf3718a6ac8aceb07a503d | |
| */ | |
| add_action( 'woocommerce_checkout_process', function(){ |
This file contains hidden or 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 get selected shipping method while checkout. Note - It won't work from backend estimated delivery calculation. | |
| * Created at : 10 Nov 2018 | |
| * Updated at : 10 Nov 2018 | |
| * PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
| * Gist Link : https://gist.github.com/varun-pluginhive/817af6c946c4c8ff15b844ca31e7023f | |
| */ | |
| add_filter( 'ph_estimated_delivery_selected_shipping_method_on_order', function( $shipping_method ){ | |
| if( ! empty($_POST['shipping_method']) ) { |
This file contains hidden or 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 WooCommerce Shipping Rates to shipping method by specified amount of percent. | |
| * Created at : 09 Nov 2018 | |
| * Updated at : 09 Nov 2018 | |
| * PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
| * Gist Link : https://gist.github.com/varun-pluginhive/ddba44d01e406891540263eb9264dd0d | |
| */ | |
| add_filter( 'woocommerce_package_rates', function( $package_rates ){ | |
| $cost_adjustment = 15; // Cost adjustment in percent |
This file contains hidden or 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 get order id from order number. | |
| * Created at : 08 Nov 2018 | |
| * Updated at : 08 Nov 2018 | |
| * PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
| * Gist Link : https://gist.github.com/varun-pluginhive/1def2866db5d1621ad46ea1c2422c1df | |
| */ | |
| if( ! class_exists('Ph_Shipment_Tracking_Order_Number_Comp') ){ | |
| class Ph_Shipment_Tracking_Order_Number_Comp{ |
This file contains hidden or 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 Label size(LabelStockType) in fedex create shipment request. | |
| * Created at : 08 Nov 2018 | |
| * Updated at : 08 Nov 2018 | |
| * PluginHive Plugins : https://www.pluginhive.com/plugins/ | |
| * Gist Link : https://gist.github.com/varun-pluginhive/4ca11475002212e4f6930c0c6ca83d44 | |
| */ | |
| add_filter( 'wf_fedex_request', function( $request ){ | |
| // Fedex Services for which the label size need to be changed |