Skip to content

Instantly share code, notes, and snippets.

Avatar

Shadi Manna shadimanna

View GitHub Profile
@shadimanna
shadimanna / gist:d1c32e93dad8008dddd9151b69e0994c
Last active Aug 19, 2020
Do not pass phone number to DHL API
View gist:d1c32e93dad8008dddd9151b69e0994c
add_filter('pr_shipping_dhl_label_args', 'remove_phone_number', 10, 2);
function remove_phone_number($args, $order_id) {
if(isset($args['shipping_address']['phone'])){
unset($args['shipping_address']['phone']);
}
return $args;
}
View Download File
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
// $file = sanitize_file_name( $_GET['path'] );
// sanitize path
$file = realpath( $_GET['path'] );
// echo $file;
if ( current_user_can( 'edit_shop_orders' ) && check_admin_referer( 'download-dhl-label' ) ) {