first commit

This commit is contained in:
2026-03-05 13:07:40 +01:00
commit 64ba0721ee
25709 changed files with 4691006 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
@CHARSET "UTF-8";
.flexible_shipping_shipment_content .dhl-package span.optional {
display: none;
}
.dhl-dimensions label {
display: block;
}
.dhl-dimensions p, .dhl-dimensions p label {
display: inline;
}
.dhl-dimensions p.form-row input {
width: 50px;
}
.dhl-button-add {
float: right;
}
.dhl-button-add-package {
float: right;
}
.dhl-button-delete, .dhl-button-delete-created {
color: #a00;
vertical-align: top;
float: right;
font-size: 13px;
line-height: 26px;
height: 28px;
margin: 0;
padding: 0 10px 1px;
cursor: pointer;
}
.dhl-button-delete-package {
color: #a00;
float: right;
font-size: 13px;
line-height: 26px;
height: 28px;
margin: 0;
padding: 0 10px 1px;
cursor: pointer;
}
.dhl-spinner {
float: none;
}
.dhl_error {
color: red;
margin: 0 4px 2px 0;
cursor: pointer;
}
a.dhl_error {
color: red;
margin: 0 4px 2px 0;
cursor: pointer;
}
.dhl-print-message {
display: block;
margin: 10px 0px 10px 0px;
}
p.dhl-cod-value span.description {
color: #a00;
}

View File

@@ -0,0 +1 @@
@CHARSET "UTF-8";.flexible_shipping_shipment_content .dhl-package span.optional{display:none}.dhl-dimensions label{display:block}.dhl-dimensions p,.dhl-dimensions p label{display:inline}.dhl-dimensions p.form-row input{width:50px}.dhl-button-add{float:right}.dhl-button-add-package{float:right}.dhl-button-delete,.dhl-button-delete-created{color:#a00;vertical-align:top;float:right;font-size:13px;line-height:26px;height:28px;margin:0;padding:0 10px 1px;cursor:pointer}.dhl-button-delete-package{color:#a00;float:right;font-size:13px;line-height:26px;height:28px;margin:0;padding:0 10px 1px;cursor:pointer}.dhl-spinner{float:none}.dhl_error{color:red;margin:0 4px 2px 0;cursor:pointer}a.dhl_error{color:red;margin:0 4px 2px 0;cursor:pointer}.dhl-print-message{display:block;margin:10px 0 10px 0}p.dhl-cod-value span.description{color:#a00}

View File

@@ -0,0 +1,58 @@
.dhl-parcelshop-select .select2-container {
width: 220px !important;
}
@media only screen and (max-width: 760px) {
.dhl-parcelshop-select .select2-container {
width: 220px !important
}
}
@media only screen and (max-width: 480px) {
.dhl-parcelshop-select .select2-container {
width: 200px !important
}
.shop_table tr td:last-of-type {
text-align: justify !important
}
}
#dhl_parcelshop_details span {
display: inline-block
}
#dhl_popup {
position: fixed;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
z-index: 100000;
display: none;
left: 0;
top: 0;
}
#dhl_popup > a {
position: absolute;
right: 30px;
color: white;
top: 20px;
}
#dhl_map {
position: fixed;
z-index: 100001;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 50%;
height: 80%;
border: none;
}
@media screen and (max-width: 768px) {
#dhl_map {
width: 90%;
}
}

View File

@@ -0,0 +1 @@
.dhl-parcelshop-select .select2-container{width:220px!important}@media only screen and (max-width:760px){.dhl-parcelshop-select .select2-container{width:220px!important}}@media only screen and (max-width:480px){.dhl-parcelshop-select .select2-container{width:200px!important}.shop_table tr td:last-of-type{text-align:justify!important}}#dhl_parcelshop_details span{display:inline-block}#dhl_popup{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.8);z-index:100000;display:none;left:0;top:0}#dhl_popup>a{position:absolute;right:30px;color:#fff;top:20px}#dhl_map{position:fixed;z-index:100001;top:50%;left:50%;transform:translate(-50%,-50%);width:50%;height:80%;border:none}@media screen and (max-width:768px){#dhl_map{width:90%}}

View File

@@ -0,0 +1,328 @@
function dhl_ajax( dhl_action, count ) {
var dhl_insurance = 0;
if ( jQuery("#dhl_"+count+"_dhl_insurance").is(':checked') ) {
dhl_insurance = jQuery("#dhl_"+count+"_dhl_insurance").val();
}
var dhl_cod = 0;
if ( jQuery("#dhl_"+count+"_dhl_cod").is(':checked') ) {
dhl_cod = jQuery("#dhl_"+count+"_dhl_cod").val();
}
var dhl_additional_packages = [];
var additional_package_count = 0;
jQuery(".dhl_additional_package").each(function(){
var additional_key = jQuery(this).attr('data-key');
var additional_package = {};
additional_package.dhl_package_type = jQuery("#dhl_"+count+"_"+additional_key+"_dhl_package_type").val();
additional_package.dhl_package_weight = jQuery("#dhl_"+count+"_"+additional_key+"_dhl_package_weight").val();
additional_package.dhl_package_width = jQuery("#dhl_"+count+"_"+additional_key+"_dhl_package_width").val();
additional_package.dhl_package_length = jQuery("#dhl_"+count+"_"+additional_key+"_dhl_package_length").val();
additional_package.dhl_package_height = jQuery("#dhl_"+count+"_"+additional_key+"_dhl_package_height").val();
dhl_additional_packages[additional_package_count] = additional_package;
additional_package_count++;
});
var ajax_data = {
'action' : 'wpdesk_dhl',
'dhl_action' : dhl_action,
'security' : jQuery("#dhl_ajax_nonce").val(),
'post_id' : jQuery("#dhl_"+count+"_post_id").val(),
'key' : jQuery("#dhl_"+count+"_key").val(),
'dhl_product' : jQuery("#dhl_"+count+"_dhl_product").val(),
'dhl_package_type' : jQuery("#dhl_"+count+"_dhl_package_type").val(),
'dhl_package_weight' : jQuery("#dhl_"+count+"_dhl_package_weight").val(),
'dhl_package_width' : jQuery("#dhl_"+count+"_dhl_package_width").val(),
'dhl_package_length' : jQuery("#dhl_"+count+"_dhl_package_length").val(),
'dhl_package_height' : jQuery("#dhl_"+count+"_dhl_package_height").val(),
'dhl_shipment_date' : jQuery("#dhl_"+count+"_dhl_shipment_date").val(),
'dhl_insurance' : dhl_insurance,
'dhl_insurance_value' : jQuery("#dhl_"+count+"_dhl_insurance_value").val(),
'dhl_cod' : dhl_cod,
'dhl_cod_value' : jQuery("#dhl_"+count+"_dhl_cod_value").val(),
'dhl_content' : jQuery("#dhl_"+count+"_dhl_content").val(),
'dhl_comment' : jQuery("#dhl_"+count+"_dhl_comment").val(),
'additional_packages' : dhl_additional_packages,
};
jQuery.ajax({
url : dhl_ajax_object.ajax_url,
data : ajax_data,
method : 'POST',
dataType: 'JSON',
success: function( data ) {
if ( data != 0 ) {
jQuery('#dhl_metabox>.inside').html(data.content);
dhl_init();
}
},
error: function ( xhr, ajaxOptions, thrownError ) {
alert( xhr.status + ': ' + thrownError );
},
complete: function() {
jQuery('.dhl-button').removeAttr('disabled','disabled');
jQuery('.dhl-spinner').css({visibility: 'hidden'});
}
});
}
jQuery(document).on('click','.dhl-button-create', function(e) {
var count = jQuery(this).attr('data-count');
if ( typeof count != 'undefined' ) {
if (jQuery(this).attr('disabled') == 'disabled') {
return;
}
jQuery('.dhl-button').attr('disabled', 'disabled');
jQuery(this).parent().find('.spinner').css({visibility: 'visible'});
dhl_ajax('create_package', count);
}
var id = jQuery(this).attr('data-id');
if ( typeof id != 'undefined' ) {
e.stopImmediatePropagation();
e.preventDefault();
var id = fs_id(this);
var fs_action = 'send';
fs_ajax( this, id, fs_action );
}
})
jQuery(document).on('click','.dhl-button-save', function(e) {
var count = jQuery(this).attr('data-count');
if ( typeof count != 'undefined' ) {
if (jQuery(this).attr('disabled') == 'disabled') {
return;
}
jQuery('.dhl-button').attr('disabled', 'disabled');
jQuery(this).parent().find('.spinner').css({visibility: 'visible'});
var count = jQuery(this).attr('data-count');
dhl_ajax('save_package', count);
}
var id = jQuery(this).attr('data-id');
if ( typeof id != 'undefined' ) {
e.stopImmediatePropagation();
e.preventDefault();
var id = fs_id(this);
var fs_action = 'save';
fs_ajax( this, id, fs_action );
}
})
jQuery(document).on('click','.dhl-button-delete', function() {
if ( jQuery(this).attr('disabled') == 'disabled' ) {
return;
}
jQuery('.dhl-button').attr('disabled','disabled');
jQuery(this).parent().find('.spinner').css({visibility: 'visible'});
var count = jQuery(this).attr('data-count');
dhl_ajax( 'delete_package', count );
})
jQuery(document).on('click','.dhl-button-delete-package', function() {
if ( jQuery(this).attr('disabled') == 'disabled' ) {
return;
}
jQuery(this).parent().remove();
})
jQuery(document).on('click','.dhl-button-delete-created', function( e ) {
var count = jQuery(this).attr('data-count');
if ( typeof count != 'undefined' ) {
if (jQuery(this).attr('disabled') == 'disabled') {
return;
}
jQuery('.dhl-button').attr('disabled', 'disabled');
jQuery(this).parent().find('.spinner').css({visibility: 'visible'});
var count = jQuery(this).attr('data-count');
dhl_ajax('delete_created_package', count);
}
var id = jQuery(this).attr('data-id');
if ( typeof id != 'undefined' ) {
e.stopImmediatePropagation();
e.preventDefault();
var id = fs_id(this);
var fs_action = 'cancel';
fs_ajax( this, id, fs_action );
}
})
jQuery(document).on('click','.dhl-button-add', function() {
if ( jQuery(this).attr('disabled') == 'disabled' ) {
return;
}
jQuery('.dhl-button').attr('disabled','disabled');
jQuery(this).parent().find('.spinner').css({visibility: 'visible'});
var ajax_data = {
'action' : 'wpdesk_dhl',
'dhl_action' : 'add_package',
'security' : jQuery("#dhl_ajax_nonce").val(),
'post_id' : jQuery("input[name=post_id]").val(),
};
jQuery.ajax({
url : dhl_ajax_object.ajax_url,
data : ajax_data,
method : 'POST',
dataType: 'JSON',
success: function( data ) {
if ( data != 0 ) {
jQuery('#dhl_metabox>.inside').html(data.content);
dhl_init();
}
},
error: function ( xhr, ajaxOptions, thrownError ) {
alert( xhr.status + ': ' + thrownError );
},
complete: function() {
jQuery('.dhl-button').removeAttr('disabled','disabled');
jQuery('.dhl-spinner').css({visibility: 'hidden'});
}
});
})
jQuery(document).on('click','.dhl-button-add-package', function() {
var count = jQuery(this).attr('data-count');
if ( typeof count != 'undefined' ) {
var count_additional = parseInt(jQuery(this).attr('data-count_additional')) + 1;
jQuery(this).attr('data-count_additional', count_additional);
var html = jQuery('#dhl_additional_package_template_' + count).html()
html = html.split('_additional_key_').join(count_additional);
html = html.split('_count_').join(count);
jQuery(this).parent().before(html);
}
var id = jQuery(this).attr('data-id');
if ( typeof id != 'undefined' ) {
var count_additional = parseInt(jQuery(this).attr('data-count_additional')) + 1;
jQuery(this).attr('data-count_additional', count_additional);
var html = jQuery('#dhl_additional_package_template_' + id).html()
html = html.split('_additional_key_').join(count_additional);
html = html.split('_count_').join(count);
jQuery(this).parent().before(html);
}
})
jQuery(document).on('click','.dhl-button-print', function() {
if ( jQuery(this).attr('disabled') == 'disabled' ) {
return;
}
jQuery('.dhl-button').attr('disabled','disabled');
jQuery(this).parent().find('.spinner').css({visibility: 'visible'});
var count = jQuery(this).attr('data-count');
var ajax_data = {
'action' : 'wpdesk_dhl',
'dhl_action' : 'print_label',
'security' : jQuery("#dhl_ajax_nonce").val(),
'post_id' : jQuery("input[name=post_id]").val(),
'shipment_id' : jQuery(this).attr('data-shipment-id'),
'key' : jQuery("#dhl_"+count+"_key").val(),
};
jQuery.ajax({
url : dhl_ajax_object.ajax_url,
data : ajax_data,
method : 'POST',
dataType: 'JSON',
success: function( data ) {
jQuery('#print_message_' + data.post.shipment_id).html(data.message);
},
error: function ( xhr, ajaxOptions, thrownError ) {
alert( xhr.status + ': ' + thrownError );
},
complete: function() {
jQuery('.dhl-button').removeAttr('disabled','disabled');
jQuery('.dhl-spinner').css({visibility: 'hidden'});
}
});
})
jQuery(document).on('click','.dhl-button-label', function() {
var shipment_id = jQuery(this).attr('data-shipment-id');
var url = dhl_ajax_object.ajax_url + '?action=wpdesk_dhl&dhl_action=get_label&security=' + jQuery("#dhl_ajax_nonce").val();
url = url + '&shipment_id=' + shipment_id;
url = url + '&post_id=' + jQuery("input[name=post_id]").val();
var count = jQuery(this).attr('data-count');
url = url + '&key=' + jQuery("#dhl_"+count+"_key").val(),
window.open( url, '_blank');
})
jQuery(document).on('change','.dhl-package-type', function() {
if ( jQuery(this).val() == 'ENVELOPE' ) {
jQuery(this).parent().parent().find('.dhl-weight').hide();
jQuery(this).parent().parent().find('.dhl-dimensions').hide();
}
else {
jQuery(this).parent().parent().find('.dhl-weight').show();
jQuery(this).parent().parent().find('.dhl-dimensions').show();
}
})
jQuery(document).on('change','.dhl-product', function() {
if ( jQuery(this).val() == 'parcelshop' ) {
jQuery(this).parent().parent().find('div.dhl-parcelshop').show();
jQuery(this).parent().parent().parent().find('.dhl-value').parent().hide();
jQuery(this).closest('.dhl-package').find('.dhl_services').closest('.form-row').hide();
}
else {
jQuery(this).parent().parent().find('div.dhl-parcelshop').hide();
jQuery(this).parent().parent().parent().find('.dhl-cod').parent().parent().show();
jQuery(this).parent().parent().parent().find('.dhl-value').parent().show();
jQuery(this).closest('.dhl-package').find('.dhl_services').closest('.form-row').show();
}
})
jQuery(document).on('change','.dhl-insurance', function() {
if ( jQuery(this).is(':checked') ) {
jQuery(this).closest('.dhl-package').find('.dhl-insurance-value').show();
}
else {
jQuery(this).closest('.dhl-package').find('.dhl-insurance-value').hide();
}
})
jQuery(document).on('change','.dhl-cod', function() {
if ( jQuery(this).is(':checked') ) {
jQuery(this).closest('.dhl-package').find('.dhl-cod-value').show();
}
else {
jQuery(this).closest('.dhl-package').find('.dhl-cod-value').hide();
}
})
function dhl_init() {
jQuery('.dhl-package-type').each(function(){
jQuery(this).change();
})
jQuery('.dhl-insurance').each(function(){
jQuery(this).change();
})
jQuery('.dhl-cod').each(function(){
jQuery(this).change();
})
jQuery('.dhl-product').each(function(){
jQuery(this).change();
})
jQuery('.dhl-disabled').each(function(){
jQuery(this).prop('disabled',true);
})
jQuery( '.wc-enhanced-select.dhl_services' ).selectWoo();
}
dhl_init();

View File

@@ -0,0 +1,36 @@
function dhl_ajax(dhl_action,count){var dhl_insurance=0;if(jQuery("#dhl_"+count+"_dhl_insurance").is(':checked')){dhl_insurance=jQuery("#dhl_"+count+"_dhl_insurance").val()}
var dhl_cod=0;if(jQuery("#dhl_"+count+"_dhl_cod").is(':checked')){dhl_cod=jQuery("#dhl_"+count+"_dhl_cod").val()}
var dhl_additional_packages=[];var additional_package_count=0;jQuery(".dhl_additional_package").each(function(){var additional_key=jQuery(this).attr('data-key');var additional_package={};additional_package.dhl_package_type=jQuery("#dhl_"+count+"_"+additional_key+"_dhl_package_type").val();additional_package.dhl_package_weight=jQuery("#dhl_"+count+"_"+additional_key+"_dhl_package_weight").val();additional_package.dhl_package_width=jQuery("#dhl_"+count+"_"+additional_key+"_dhl_package_width").val();additional_package.dhl_package_length=jQuery("#dhl_"+count+"_"+additional_key+"_dhl_package_length").val();additional_package.dhl_package_height=jQuery("#dhl_"+count+"_"+additional_key+"_dhl_package_height").val();dhl_additional_packages[additional_package_count]=additional_package;additional_package_count++});var ajax_data={'action':'wpdesk_dhl','dhl_action':dhl_action,'security':jQuery("#dhl_ajax_nonce").val(),'post_id':jQuery("#dhl_"+count+"_post_id").val(),'key':jQuery("#dhl_"+count+"_key").val(),'dhl_product':jQuery("#dhl_"+count+"_dhl_product").val(),'dhl_package_type':jQuery("#dhl_"+count+"_dhl_package_type").val(),'dhl_package_weight':jQuery("#dhl_"+count+"_dhl_package_weight").val(),'dhl_package_width':jQuery("#dhl_"+count+"_dhl_package_width").val(),'dhl_package_length':jQuery("#dhl_"+count+"_dhl_package_length").val(),'dhl_package_height':jQuery("#dhl_"+count+"_dhl_package_height").val(),'dhl_shipment_date':jQuery("#dhl_"+count+"_dhl_shipment_date").val(),'dhl_insurance':dhl_insurance,'dhl_insurance_value':jQuery("#dhl_"+count+"_dhl_insurance_value").val(),'dhl_cod':dhl_cod,'dhl_cod_value':jQuery("#dhl_"+count+"_dhl_cod_value").val(),'dhl_content':jQuery("#dhl_"+count+"_dhl_content").val(),'dhl_comment':jQuery("#dhl_"+count+"_dhl_comment").val(),'additional_packages':dhl_additional_packages,};jQuery.ajax({url:dhl_ajax_object.ajax_url,data:ajax_data,method:'POST',dataType:'JSON',success:function(data){if(data!=0){jQuery('#dhl_metabox>.inside').html(data.content);dhl_init()}},error:function(xhr,ajaxOptions,thrownError){alert(xhr.status+': '+thrownError)},complete:function(){jQuery('.dhl-button').removeAttr('disabled','disabled');jQuery('.dhl-spinner').css({visibility:'hidden'})}})}
jQuery(document).on('click','.dhl-button-create',function(e){var count=jQuery(this).attr('data-count');if(typeof count!='undefined'){if(jQuery(this).attr('disabled')=='disabled'){return}
jQuery('.dhl-button').attr('disabled','disabled');jQuery(this).parent().find('.spinner').css({visibility:'visible'});dhl_ajax('create_package',count)}
var id=jQuery(this).attr('data-id');if(typeof id!='undefined'){e.stopImmediatePropagation();e.preventDefault();var id=fs_id(this);var fs_action='send';fs_ajax(this,id,fs_action)}})
jQuery(document).on('click','.dhl-button-save',function(e){var count=jQuery(this).attr('data-count');if(typeof count!='undefined'){if(jQuery(this).attr('disabled')=='disabled'){return}
jQuery('.dhl-button').attr('disabled','disabled');jQuery(this).parent().find('.spinner').css({visibility:'visible'});var count=jQuery(this).attr('data-count');dhl_ajax('save_package',count)}
var id=jQuery(this).attr('data-id');if(typeof id!='undefined'){e.stopImmediatePropagation();e.preventDefault();var id=fs_id(this);var fs_action='save';fs_ajax(this,id,fs_action)}})
jQuery(document).on('click','.dhl-button-delete',function(){if(jQuery(this).attr('disabled')=='disabled'){return}
jQuery('.dhl-button').attr('disabled','disabled');jQuery(this).parent().find('.spinner').css({visibility:'visible'});var count=jQuery(this).attr('data-count');dhl_ajax('delete_package',count)})
jQuery(document).on('click','.dhl-button-delete-package',function(){if(jQuery(this).attr('disabled')=='disabled'){return}
jQuery(this).parent().remove()})
jQuery(document).on('click','.dhl-button-delete-created',function(e){var count=jQuery(this).attr('data-count');if(typeof count!='undefined'){if(jQuery(this).attr('disabled')=='disabled'){return}
jQuery('.dhl-button').attr('disabled','disabled');jQuery(this).parent().find('.spinner').css({visibility:'visible'});var count=jQuery(this).attr('data-count');dhl_ajax('delete_created_package',count)}
var id=jQuery(this).attr('data-id');if(typeof id!='undefined'){e.stopImmediatePropagation();e.preventDefault();var id=fs_id(this);var fs_action='cancel';fs_ajax(this,id,fs_action)}})
jQuery(document).on('click','.dhl-button-add',function(){if(jQuery(this).attr('disabled')=='disabled'){return}
jQuery('.dhl-button').attr('disabled','disabled');jQuery(this).parent().find('.spinner').css({visibility:'visible'});var ajax_data={'action':'wpdesk_dhl','dhl_action':'add_package','security':jQuery("#dhl_ajax_nonce").val(),'post_id':jQuery("input[name=post_id]").val(),};jQuery.ajax({url:dhl_ajax_object.ajax_url,data:ajax_data,method:'POST',dataType:'JSON',success:function(data){if(data!=0){jQuery('#dhl_metabox>.inside').html(data.content);dhl_init()}},error:function(xhr,ajaxOptions,thrownError){alert(xhr.status+': '+thrownError)},complete:function(){jQuery('.dhl-button').removeAttr('disabled','disabled');jQuery('.dhl-spinner').css({visibility:'hidden'})}})})
jQuery(document).on('click','.dhl-button-add-package',function(){var count=jQuery(this).attr('data-count');if(typeof count!='undefined'){var count_additional=parseInt(jQuery(this).attr('data-count_additional'))+1;jQuery(this).attr('data-count_additional',count_additional);var html=jQuery('#dhl_additional_package_template_'+count).html()
html=html.split('_additional_key_').join(count_additional);html=html.split('_count_').join(count);jQuery(this).parent().before(html)}
var id=jQuery(this).attr('data-id');if(typeof id!='undefined'){var count_additional=parseInt(jQuery(this).attr('data-count_additional'))+1;jQuery(this).attr('data-count_additional',count_additional);var html=jQuery('#dhl_additional_package_template_'+id).html()
html=html.split('_additional_key_').join(count_additional);html=html.split('_count_').join(count);jQuery(this).parent().before(html)}})
jQuery(document).on('click','.dhl-button-print',function(){if(jQuery(this).attr('disabled')=='disabled'){return}
jQuery('.dhl-button').attr('disabled','disabled');jQuery(this).parent().find('.spinner').css({visibility:'visible'});var count=jQuery(this).attr('data-count');var ajax_data={'action':'wpdesk_dhl','dhl_action':'print_label','security':jQuery("#dhl_ajax_nonce").val(),'post_id':jQuery("input[name=post_id]").val(),'shipment_id':jQuery(this).attr('data-shipment-id'),'key':jQuery("#dhl_"+count+"_key").val(),};jQuery.ajax({url:dhl_ajax_object.ajax_url,data:ajax_data,method:'POST',dataType:'JSON',success:function(data){jQuery('#print_message_'+data.post.shipment_id).html(data.message)},error:function(xhr,ajaxOptions,thrownError){alert(xhr.status+': '+thrownError)},complete:function(){jQuery('.dhl-button').removeAttr('disabled','disabled');jQuery('.dhl-spinner').css({visibility:'hidden'})}})})
jQuery(document).on('click','.dhl-button-label',function(){var shipment_id=jQuery(this).attr('data-shipment-id');var url=dhl_ajax_object.ajax_url+'?action=wpdesk_dhl&dhl_action=get_label&security='+jQuery("#dhl_ajax_nonce").val();url=url+'&shipment_id='+shipment_id;url=url+'&post_id='+jQuery("input[name=post_id]").val();var count=jQuery(this).attr('data-count');url=url+'&key='+jQuery("#dhl_"+count+"_key").val(),window.open(url,'_blank')})
jQuery(document).on('change','.dhl-package-type',function(){if(jQuery(this).val()=='ENVELOPE'){jQuery(this).parent().parent().find('.dhl-weight').hide();jQuery(this).parent().parent().find('.dhl-dimensions').hide()}else{jQuery(this).parent().parent().find('.dhl-weight').show();jQuery(this).parent().parent().find('.dhl-dimensions').show()}})
jQuery(document).on('change','.dhl-product',function(){if(jQuery(this).val()=='parcelshop'){jQuery(this).parent().parent().find('div.dhl-parcelshop').show();jQuery(this).parent().parent().parent().find('.dhl-value').parent().hide();jQuery(this).closest('.dhl-package').find('.dhl_services').closest('.form-row').hide()}else{jQuery(this).parent().parent().find('div.dhl-parcelshop').hide();jQuery(this).parent().parent().parent().find('.dhl-cod').parent().parent().show();jQuery(this).parent().parent().parent().find('.dhl-value').parent().show();jQuery(this).closest('.dhl-package').find('.dhl_services').closest('.form-row').show()}})
jQuery(document).on('change','.dhl-insurance',function(){if(jQuery(this).is(':checked')){jQuery(this).closest('.dhl-package').find('.dhl-insurance-value').show()}else{jQuery(this).closest('.dhl-package').find('.dhl-insurance-value').hide()}})
jQuery(document).on('change','.dhl-cod',function(){if(jQuery(this).is(':checked')){jQuery(this).closest('.dhl-package').find('.dhl-cod-value').show()}else{jQuery(this).closest('.dhl-package').find('.dhl-cod-value').hide()}})
function dhl_init(){jQuery('.dhl-package-type').each(function(){jQuery(this).change()})
jQuery('.dhl-insurance').each(function(){jQuery(this).change()})
jQuery('.dhl-cod').each(function(){jQuery(this).change()})
jQuery('.dhl-product').each(function(){jQuery(this).change()})
jQuery('.dhl-disabled').each(function(){jQuery(this).prop('disabled',!0)})
jQuery('.wc-enhanced-select.dhl_services').selectWoo()}
dhl_init()

View File

@@ -0,0 +1,166 @@
(
function ( $ ) {
$( document ).on(
'change',
'#dhl_parcelshop',
function () {
jQuery( 'body' ).trigger( 'update_checkout' );
}
);
var dhl_select_type = dhl_checkout_js.select_type ? dhl_checkout_js.select_type : 'select2';
var dhl_lang = dhl_checkout_js.lang;
$( document ).on(
'click',
'#dhl-parcelshop-select-map',
function () {
var source = 'dhl';
var popup = $( '.js--popup-' + source );
if ( ! popup.length ) {
var map_url = new URL( dhl_checkout_js.map_url );
map_url.searchParams.append( 'options_pickup_cod', $( this ).attr( 'data-dhl_parcelshop_cod' ) );
map_url.searchParams.append( 'country', $( this ).attr( 'data-country' ) );
map_url.searchParams.append( 'postCode', $( this ).attr( 'data-postcode' ) );
map_url.searchParams.append( 'zoom', '1' );
var close_button = $( '<a></a>' ).attr( 'href', '#0' ).text( dhl_checkout_js.l10n.close_popup ).addClass( 'js--popup-close-button-' + source );
var iframe = $( '<iframe>' ).attr( 'id', source + '_map' ).attr( 'src', map_url )
popup = $( '<div></div>' ).attr( 'id', source + '_popup' ).addClass( 'js--popup-' + source ).append( close_button ).append( iframe );
$( '.js--popup-container-' + source ).html( popup );
}
popup.show();
return false;
}
);
$( document ).on(
'click',
'.js--popup-close-button-dhl',
function () {
$( '.js--popup-dhl' ).hide();
return false;
}
);
$( 'body' ).on(
'updated_checkout',
function () {
var _dhl_select = $( '#dhl_parcelshop' );
var containerClass = 'dhl-parcelshop-select-container';
var options = {
containerCssClass: containerClass,
};
if ( dhl_select_type === 'select2_ajax' ) {
let dhl_select = jQuery( '#dhl_parcelshop' );
options = {
containerCssClass: containerClass,
ajax: {
url: woocommerce_params.ajax_url,
dataType: 'json',
delay: 300,
type: 'POST',
data: function ( params ) {
return {
action: 'dhl_search_machines_via_ajax',
city: params.term,
postcode: dhl_select.data( 'postcode' ),
country: dhl_select.data( 'country' ),
security: dhl_checkout_js.ajax_nonce
};
},
processResults: function ( data ) {
return {
results: data.items,
};
},
cache: true,
},
minimumInputLength: 3,
escapeMarkup: function ( markup ) {
return markup;
},
placeholder: dhl_lang.placeholder,
language: {
inputTooShort: function ( args ) {
var remainingChars = args.minimum - args.input.length;
return dhl_lang.min_chars.replace( '%', remainingChars );
},
loadingMore: function () {
return dhl_lang.loadingMore;
},
noResults: function () {
return dhl_lang.noResults;
},
searching: function () {
return dhl_lang.searching;
},
errorLoading: function () {
return dhl_lang.errorLoading;
},
}
};
}
if ( dhl_select_type === 'select2' || dhl_select_type === 'select2_ajax' ) {
if ( $.fn.selectWoo ) {
_dhl_select.selectWoo( options );
} else if ( $.fn.select2 ) {
_dhl_select.select2( options );
}
}
}
);
}
)( jQuery );
function dhl_set_dhl_parcelshop( point ) {
var dhl_select_type = dhl_checkout_js.select_type ? dhl_checkout_js.select_type : 'select2';
let $dhl_parcelshop = jQuery( '#dhl_parcelshop' );
let country = $dhl_parcelshop.data( 'country' );
jQuery( '.js--popup-dhl' ).hide();
window.console.log( point );
let code = point.sap;
if ( 'PL' !== country ) {
code = point.sap + ':' + point.zip;
}
if ( dhl_select_type === 'select2' ) {
var exists = jQuery( "#dhl_parcelshop:has(option[value='" + code + "'])" ).length > 0;
if ( exists ) {
$dhl_parcelshop.val( code ).trigger( 'change' );
} else {
alert( dhl_checkout_js.parcelshop_not_exists );
}
} else if ( dhl_select_type === 'select2_ajax' ) {
var data = {
action: 'dhl_search_machines_via_ajax',
code: code,
postcode: point.zip,
city: point.city,
country: jQuery( '#dhl-parcelshop-select-map' ).attr( 'data-country' ),
security: dhl_checkout_js.ajax_nonce
};
jQuery.post(
woocommerce_params.ajax_url,
data,
function ( response ) {
if ( typeof response.id !== 'undefined' ) {
$dhl_parcelshop.html( '<option selected value="' + response.id + '">' + response.text + '</option>' );
jQuery( 'body' ).trigger( 'update_checkout' );
} else {
alert( dhl_checkout_js.parcelshop_not_exists );
}
}
);
}
}

View File

@@ -0,0 +1,5 @@
(function($){$(document).on('change','#dhl_parcelshop',function(){jQuery('body').trigger('update_checkout')});var dhl_select_type=dhl_checkout_js.select_type?dhl_checkout_js.select_type:'select2';var dhl_lang=dhl_checkout_js.lang;$(document).on('click','#dhl-parcelshop-select-map',function(){var source='dhl';var popup=$('.js--popup-'+source);if(!popup.length){var map_url=new URL(dhl_checkout_js.map_url);map_url.searchParams.append('options_pickup_cod',$(this).attr('data-dhl_parcelshop_cod'));map_url.searchParams.append('country',$(this).attr('data-country'));map_url.searchParams.append('postCode',$(this).attr('data-postcode'));map_url.searchParams.append('zoom','1');var close_button=$('<a></a>').attr('href','#0').text(dhl_checkout_js.l10n.close_popup).addClass('js--popup-close-button-'+source);var iframe=$('<iframe>').attr('id',source+'_map').attr('src',map_url)
popup=$('<div></div>').attr('id',source+'_popup').addClass('js--popup-'+source).append(close_button).append(iframe);$('.js--popup-container-'+source).html(popup)}
popup.show();return!1});$(document).on('click','.js--popup-close-button-dhl',function(){$('.js--popup-dhl').hide();return!1});$('body').on('updated_checkout',function(){var _dhl_select=$('#dhl_parcelshop');var containerClass='dhl-parcelshop-select-container';var options={containerCssClass:containerClass,};if(dhl_select_type==='select2_ajax'){let dhl_select=jQuery('#dhl_parcelshop');options={containerCssClass:containerClass,ajax:{url:woocommerce_params.ajax_url,dataType:'json',delay:300,type:'POST',data:function(params){return{action:'dhl_search_machines_via_ajax',city:params.term,postcode:dhl_select.data('postcode'),country:dhl_select.data('country'),security:dhl_checkout_js.ajax_nonce}},processResults:function(data){return{results:data.items,}},cache:!0,},minimumInputLength:3,escapeMarkup:function(markup){return markup},placeholder:dhl_lang.placeholder,language:{inputTooShort:function(args){var remainingChars=args.minimum-args.input.length;return dhl_lang.min_chars.replace('%',remainingChars)},loadingMore:function(){return dhl_lang.loadingMore},noResults:function(){return dhl_lang.noResults},searching:function(){return dhl_lang.searching},errorLoading:function(){return dhl_lang.errorLoading},}}}
if(dhl_select_type==='select2'||dhl_select_type==='select2_ajax'){if($.fn.selectWoo){_dhl_select.selectWoo(options)}else if($.fn.select2){_dhl_select.select2(options)}}})})(jQuery);function dhl_set_dhl_parcelshop(point){var dhl_select_type=dhl_checkout_js.select_type?dhl_checkout_js.select_type:'select2';let $dhl_parcelshop=jQuery('#dhl_parcelshop');let country=$dhl_parcelshop.data('country');jQuery('.js--popup-dhl').hide();window.console.log(point);let code=point.sap;if('PL'!==country){code=point.sap+':'+point.zip}
if(dhl_select_type==='select2'){var exists=jQuery("#dhl_parcelshop:has(option[value='"+code+"'])").length>0;if(exists){$dhl_parcelshop.val(code).trigger('change')}else{alert(dhl_checkout_js.parcelshop_not_exists)}}else if(dhl_select_type==='select2_ajax'){var data={action:'dhl_search_machines_via_ajax',code:code,postcode:point.zip,city:point.city,country:jQuery('#dhl-parcelshop-select-map').attr('data-country'),security:dhl_checkout_js.ajax_nonce};jQuery.post(woocommerce_params.ajax_url,data,function(response){if(typeof response.id!=='undefined'){$dhl_parcelshop.html('<option selected value="'+response.id+'">'+response.text+'</option>');jQuery('body').trigger('update_checkout')}else{alert(dhl_checkout_js.parcelshop_not_exists)}})}}

View File

@@ -0,0 +1 @@
// i18n support

View File

@@ -0,0 +1,365 @@
*** WooCommerce DHL Changelog ***
## [1.12.8] - 2023-08-07
### Dodano
- Wsparcie dla WordPress 6.3
## [1.12.7] - 2023-08-03
### Dodano
- Wsparcie dla WooCommerce 8.0
## [1.12.6] - 2023-07-03
### Dodano
- Wsparcie dla WooCommerce 7.9
- Prefixowanie bibliotek Psr
## [1.12.5] - 2023-06-12
### Dodano
- Wsparcie dla WooCommerce 7.8
## [1.12.4] - 2023-03-27
### Dodano
- Wsparcie dla WordPress 6.2
- Wsparcie dla WooCommerce 7.6
## [1.12.3] - 2023-03-09
### Dodano
- Wsparcie dla WooCommerce 7.5
## [1.12.2] - 2023-02-07
### Dodano
- Wsparcie dla WooCommerce 7.4
## [1.12.1] - 2023-01-09
### Dodano
- Wsparcie dla WooCommerce 7.3
## [1.12.0] - 2022-11-28
### Dodano
- Wsparcie dla WooCommerce 7.2
- Deklarację kompatybilności dla WooCommerce High-Performance Order Storage (HPOS)
## [1.11.1] - 2022-11-03
### Poprawiono
- Wersja wtyczki
- Changelog
- Obsługa daty nadania
## [1.11.0] - 2022-10-24
### Dodano
- Wsparcie dla WooCommerce 7.1
- Tracker Octolize
## [1.10.0] - 2022-10-18
### Dodano
- Wsparcie dla Wordpress 6.1
- Kompatybilność z WooCommerce High-Performance Order Storage (HPOS)
## [1.9.10] - 2022-10-03
### Dodano
- Wsparcie dla WooCommerce 7.0
## [1.9.9] - 2022-08-08
### Dodano
- Wsparcie dla WooCommerce 6.8
## [1.9.8] - 2022-07-06
### Dodano
- Wsparcie dla WooCommerce 6.7
## [1.9.7] - 2022-06-15
### Dodano
- Wsparcie dla WooCommerce 6.6
## [1.9.6] - 2022-05-12
### Dodano
- Wsparcie dla Wordpress 6.0
## [1.9.5] - 2022-04-20
### Dodano
- Wsparcie dla WooCommerce 6.4
## [1.9.4] - 2022-03-02
### Dodano
- Wsparcie dla WooCommerce 6.3
## [1.9.3] - 2022-01-25
### Poprawiono
- Obsługa domyślnej wagi przesyłki
- Dane punktu odbioru dla Baselinker
## [1.9.2] - 2022-01-20
### Poprawiono
- Obsługa zamówień bez kompletnych danych w adresie wysyłki (np. brak kraju wysyłki)
## [1.9.1] - 2022-01-19
### Dodano
- Wsparcie dla WooCommerce 6.2
### Poprawiono
- Masowe nadawanie przesyłek
- Wsparcie dla BaseLinker przy tworzeniu zamówień
## [1.9.0] - 2022-01-18
### Dodano
- Wymaganie instalacji modułu PHP SOAP
## [1.8.1] - 2022-01-17
### Dodano
- Możliwość zapisu dziennika zdarzeń w komunikacji z API DHL Parcelshop
### Poprawiono
- Obsługę przesyłek Parcel Premium
## [1.8.0] - 2022-01-11
### Dodano
- Wsparcie do obsługi dodatkowych krajów przy parcelshop
- Możliwość zapisu dziennika zdarzeń w komunikacji z API DHL
- Wsparcie dla BaseLinker dla punktów
- Wsparcie dla WordPress 5.9
- Wsparcie dla WooCommerce 6.0
- Wsparcie dla WooCommerce 6.1
### Zmieniono
- Popup wyboru punktu na modal
- Obsługę statusu połączenia z API DHL
## [1.7.0] - 2021-10-05
### Zmieniono
- Aktywacja licencji z poziomu listy wtyczek
## [1.6.3] - 2021-07-28
### Poprawiono
- Filtrowanie parcelshop jeżeli zaznaczono opcję pobranie
## [1.6.2] - 2021-06-21
### Poprawiono
- parcelshop nie jest wymagany gdy w koszyku pozostały tylko produkty wirtualne
## [1.6.1] - 2021-01-20
### Poprawiono
- Pole "usługi dodatkowe" widoczne bez wybranej integracji
## [1.6.0] - 2021-01-18
### Poprawiono
- Fatal Error przy wyłączonej wtyczce Flexible Shipping
### Dodano
- Usługi dodatkowe: Doręczenie w sobotę, Przesyłka niestandardowa, Informacje przed doręczeniem
## [1.5.5] - 2020-12-07
### Dodano
- Wsparcie dla WordPress 5.6
## [1.5.4] - 2020-11-23
### Dodano
- Usuwanie spacji z kodu pocztowego odbiorcy
### Poprawiono
- Tooltipy dla pól ustawień metody wysyłki
## [1.5.3] - 2020-11-12
### Dodano
- Wsparcie dla WooCommmerce 4.7
## [1.5.2] - 2020-10-21
### Poprawiono
- Komunikat przy długim adresie wysyłki
## [1.5.1] - 2020-09-03
### Dodano
- Stała identyfikująca wersję wtyczki
## [1.5.0] - 2020-08-13
### Dodano
- Nowa usługa DHL Parcel Premium, z gwarancją dostarczenia następnego dnia roboczego
- Wsparcie dla WooCommmerce 4.4
- Wsparcie dla WordPress 5.5
## [1.4.23] - 2020-05-12
### Poprawiono
- Wyśwetlanie punktów odbioru w zamówieniach tworzonych przez administratora
## [1.4.22] - 2020-05-06
### Dodano
- Dodane wsparcie dla WooCommmerce 4.1
## [1.4.21] - 2020-03-17
### Poprawiono
- Wyświetlanie przycisku drukowania Flexible Printing
## [1.4.20] - 2020-03-10
### Poprawiono
- Błąd pobierania metod wysyłki na WooCommerce 4.0
## [1.4.19] - 2020-02-27
### Dodano
- Informacje o płatności zapisane na przesyłce podczas składania zamówienia
## [1.4.18] - 2020-01-03
### Dodano
- Wsparcie dla WooCommmerce 3.9
### Poprawiono
- Poprawiony notice przy włączonym DEBUG
## [1.4.17] - 2019-12-23
### Poprawiono
- Błąd związany z długą nazwą/adresu parcelshopu wychodzącą poza kontener
## [1.4.16] - 2019-12-19
### Poprawiono
- Cachowanie punktów kolektorskich na bardziej wydajne
## [1.4.15] - 2019-12-11
### Poprawiono
- Możliwość wybrania niedostępnych punktów
- Błąd przy niedostępnych punktach odbioru
## [1.4.14] - 2019-12-05
### Poprawiono
- Błąd związany z czyszczeniem cache listy punktów
### Zabezpieczono
- Aktualizacja wewnętrznych bibliotek do najnowszych wersji
## [1.4.13] - 2019-11-08
### Poprawiono
- Błąd 404 przy ładowaniu pliku JavaScript
## [1.4.12] - 2019-11-04
### Dodano
- Wsparcie dla WooCommerce 3.8 oraz WordPress 5.3
## [1.4.11] - 2019-10-31
### Poprawiono
- Błąd w select2 Ajax w edycji zamówienia
## [1.4.10] - 2019-10-22
### Dodano
- Wsparcie tłumaczeń Javascript i18n
## [1.4.9] - 2019-10-18
### Zmieniono
- Select2 na select2 Ajax w edycji zamówienia
## [1.4.8] - 2019-10-10
### Dodano
- Obsługa prefiksowanych bibliotek WPDesk
## [1.4.7] - 2019-10-09
### Poprawiono
- Warning w logach
## [1.4.6] - 2019-10-07
### Zmieniono
- Reakcję w odpowiedzi na niedostępne DHL Api. Zamiast fatal error, zapis do loga i brak punktów na liście
## [1.4.5] - 2019-10-07
### Zmieniono
- Interwał czasowego pobierania listy punktów odbioru z serwerów DHL z tygodnia na 24h
## [1.4.4] - 2019-08-12
### Dodano
- Wsparcia dla WooCommerce 3.7
## [1.4.3] - 2019-07-18
### Poprawiono
- Błąd konfliktu jQuery i wyboru punktu z mapy
## [1.4.2] - 2019-07-16
### Poprawiono
- Błąd znikającego parcelu w polu wyboru przy przeładowaniu
## [1.4.1] - 2019-07-11
### Poprawiono
- Błąd który mógł się pojawić podczas aktywacji wtyczki
## [1.4.0] - 2019-07-04
### Dodano
- Wsparcie dla bibliotek WPDesk
### Poprawiono
- Błąd z polem select2 związanego ze spacjami
- Błąd wyboru punktu z mapy
## [1.3.3] - 2019-04-25
### Poprawiono
- Błąd wyszukiwania w polu select
## [1.3.2] - 2019-04-10
### Dodano
- Obsługa pobrania dla punktów odbioru
## [1.3.1] - 2019-01-14
### Poprawiono
- Błąd dla wyszukiwania punktów (AJAX) dla niezalogowanych użytkowników
## [1.3] - 2019-01-07
### Dodano
- Pola select2 z obsługą AJAX dla wyszukiwania punktów odbioru
## [1.2.6] - 2018-12-05
### Dodano
- Wsparcie dla WordPress 5.0
## [1.2.5] - 2018-10-16
### Dodano
- Wsparcie dla WooCommerce 3.5
### Usunięto
- Wsparcia dla wersji WooCommerce 3.0 i starszych (wtyczka może dalej działać z wcześniejszymi wersjami, ale nie deklarujemy oficjalnego wsparcia i nie testowaliśmy wtyczki z tymi wersjami)
## [1.2.4] - 2018-08-20
### Poprawiono
- Link śledzenia przesyłki
## [1.2.3] - 2018-06-19
### Poprawiono
- Problem z nieprawidłową jednostką wagi
- Wyświetlanie parametru pola optional w panelu administratora
- Notice w edycji zamówienia
## [1.2.2] - 2018-05-23
### Dodano
- Wsparcie dla WooCommerce 3.4
## [1.2.1] - 2018-01-12
### Poprawiono
- Automatyczna zmiana statusu zamówienia po utworzeniu przesyłki
## [1.2] - 2017-06-22
### Dodano
- Usługa DHL Parcelshop - odbiór w punkcie
- Możliwość obsługi wielu przesyłek DHL do jednego zamówienia
- Możliwość tworzenia przesyłek DHL do zamówień utworzonych ręcznie
### Zmieniono
- Całkowicie przebudowana architektura wtyczki aby usprawnić procesy np. automatyzację wysyłki
## [1.1.1] - 2017-04-13
### Poprawiono
- Aktywacji wtyczki w WP Desk Helper
## [1.1] - 2017-04-06
### Dodano
- Wsparcie dla WooCommerce 3.0
- Możliwość automatycznego nadawania przesyłek
- Możliwość nadawania przesyłek przez Masowe działania
- Możliwość automatycznej zmiany statusu zamówienia na Zrealizowane po nadaniu przesyłki
- Obsługi wielu paczek dla jednej przesyłki
- Integracja z Flexible Printing
### Usunięto
- Wsparcie dla wersji WooCommerce poniżej 2.5 (wtyczka może dalej działać z wcześniejszymi wersjami, ale nie deklarujemy oficjalnego wsparcia i nie testowaliśmy wtyczki z tymi wersjami)
## [1.0.2] - 2016-12-20
### Poprawiono
- Poprawki związane z nadawcą paczek (niekompletne dane adresowe, dane płatnika)
- Warunkowe ładowanie CSS i JS w panelu admina, tylko wtedy, gdy są używane
## [1.0.1] - 2016-10-14
### Poprawiono
- Drobne poprawki kompatybilności
## [1.0] - 2016-10-14
### Dodano
- Pierwsze wydanie!
##### Dodano,Poprawiono

View File

@@ -0,0 +1,78 @@
<?php
/**
* Class WPDesk_WooCommerce_DHL_Select_Parcels_Via_Ajax
*/
class WPDesk_WooCommerce_DHL_Ajax_Request {
/**
* @var string
*/
private $city;
/**
* @var string
*/
private $code;
/**
* @var string
*/
private $country;
/**
* @var array
*/
private $request;
/** @var string Query arg is also defined in JS var */
const NONCE_ARG = 'security';
/**
* WPDesk_WooCommerce_DHL_Ajax_Request constructor.
*
* @param string $nonce_name
* @param array $request
*/
public function __construct( $nonce_name, $request ) {
$this->request = $request;
if( check_ajax_referer( $nonce_name, self::NONCE_ARG, false ) ) {
$this->country = $this->validate('country' );
$this->city = $this->validate('city' );
$this->code = $this->validate('code' );
}
}
/**
* @param string $name
*/
private function validate( $name ) {
if( isset( $this->request[ $name ] ) ) {
return sanitize_text_field( wp_unslash( $this->request[ $name ] ) );
}
}
/**
* @return string
*/
public function getCity() {
return (string) $this->city;
}
/**
* @return string
*/
public function getCode() {
return (string) $this->code;
}
/**
* @return string
*/
public function getCountry() {
return (string) $this->country;
}
}

View File

@@ -0,0 +1,22 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
if ( !trait_exists( 'WPDesk_Can_Manage_DHL_Weight' ) ) {
trait WPDesk_Can_Manage_DHL_Weight {
/**
* Convert WooCommerce weight to DHL weight.
*
* @param string $wc_weight WooCommerce weight.
*
* @return float DHL weight.
*/
private function convert_wc_weight_to_dhl($wc_weight) {
$wc_weight = floatval($wc_weight);
$weight = wc_get_weight($wc_weight, 'kg' );
return ceil($weight);
}
}
}

View File

@@ -0,0 +1,260 @@
<?php
use VendorDHL\Psr\Log\LoggerInterface;
use WPDesk\DHL\HelperTrait;
if ( ! defined( 'ABSPATH' ) ) {
exit;
} // Exit if accessed directly
if ( ! class_exists( 'WPDesk_WooCommerce_DHL_API' ) ) {
/**
* DHL API.
*/
class WPDesk_WooCommerce_DHL_API {
use HelperTrait;
/**
* @var string
*/
private $login;
/**
* @var string
*/
private $password;
/**
* @var bool
*/
private $test_api;
/**
* @var array
*/
private $auth_data;
/**
* @var bool|SoapClient
*/
private $client = false;
/**
* @var LoggerInterface
*/
private $logger;
/**
* @param string $login .
* @param string $password .
* @param LoggerInterface $logger .
* @param bool $test_api .
*/
public function __construct( $login, $password, $logger, $test_api = false ) {
$this->login = $login;
$this->password = $password;
$this->test_api = $test_api;
$this->auth_data = [
'username' => $login,
'password' => $password,
];
$this->logger = $logger;
}
public function clear_cache() {
global $wpdb;
$transients = $wpdb->get_results(
"SELECT option_name AS name, option_value AS value FROM $wpdb->options
WHERE option_name LIKE '_transient_dhl%'
"
);
foreach ( $transients as $transient ) {
delete_transient( substr( $transient->name, 11 ) );
}
}
/**
* @return SoapClient
* @throws SoapFault
*/
public function get_client() {
if ( ! $this->client ) {
$dhl_webapi_url = 'https://dhl24.com.pl/webapi2';
if ( $this->test_api ) {
$dhl_webapi_url = 'https://sandbox.dhl24.com.pl/webapi2';
}
$this->client = new \VendorDHL\WPDesk\SOAP\SoapClientWithLogger(
new SoapClient(
$dhl_webapi_url,
[
'keep-alive' => true,
'connection_timeout' => 30,
'trace' => 1,
]
),
$this->logger,
2000
);
}
return $this->client;
}
public function ping() {
$client = $this->get_client();
$params = [
'authData' => $this->auth_data,
'createdFrom' => date( 'Y-m-d' ),
'createdTo' => date( 'Y-m-d', time() + 5 * DAY_IN_SECONDS ),
];
return $client->getMyShipments( $params );
}
public function create_shipment( $shipments ) {
$client = $this->get_client();
$params = [
'authData' => $this->auth_data,
'shipments' => $shipments,
];
return $client->createShipments( $params );
}
public function get_service_point( $service_point, $post_code, $radius, $is_cod = false, $country = '', $city = '' ) {
try {
try {
$all_items = $this->get_nearest_servicepoints( $post_code, $radius, $is_cod, $country, $city );
} catch ( Exception $e ) {
$this->logger->warning( $e->getMessage() );
}
foreach ( $all_items as $item ) {
if ( $item->id === (string) $service_point ) {
return $item;
}
}
return '';
} catch ( Exception $e ) {
error_log( "Exception {$e->getMessage()} in DHL::get_service_point" );
return '';
}
}
public function get_postal_code_services( $post_code, $pickup_date, $cache = true ) {
$transient_name = 'dhl_pcs_services_' . $post_code . '-' . $pickup_date . '_' . date( 'H' );
if ( $this->test_api ) {
$transient_name .= '_test';
}
$ret = get_transient( $transient_name );
if ( $ret === false ) {
$client = $this->get_client();
$params = [
'authData' => $this->auth_data,
'postCode' => $post_code,
'pickupDate' => $pickup_date,
];
$ret = $client->getPostalCodeServices( $params );
set_transient( $transient_name, $ret, HOUR_IN_SECONDS );
}
return $ret;
}
public function get_label( $shipment_id, $label_format ) {
$client = $this->get_client();
$params = [
'authData' => $this->auth_data,
'itemsToPrint' => [
[
'labelType' => $label_format,
'shipmentId' => $shipment_id,
],
],
];
return $client->getLabels( $params );
}
public function delete_shipment( $shipment_id ) {
$client = $this->get_client();
$params = [
'authData' => $this->auth_data,
'shipments' => [ $shipment_id ],
];
return $client->deleteShipments( $params );
}
public function get_nearest_servicepoints( $postcode = '00001', $radius = 5000, $is_cod = false, $country = '', $city = '' ) {
$city = function_exists( 'mb_substr' ) ? mb_substr( $city, 0, -1 ) : substr( $city, 0, -1 );
$postcode = str_replace( '-', '', $postcode );
$params = [
'authData' => $this->auth_data,
'structure' => [
'postcode' => $postcode,
'radius' => $radius,
'country' => $country,
'city' => $city,
],
];
$params_for_cache = array_merge(
$params,
[
'test' => $this->test_api,
'version' => WOOCOMMERCE_DHL_VERSION,
]
);
$transient_key = $this->prepare_transient_key( $params_for_cache, __METHOD__ );
$nearest_servicepoints_array = get_transient( $transient_key );
$nearest_servicepoints_download_interval = 60 * 60 * 24;
if ( ! $nearest_servicepoints_array ) {
$client = $this->get_client();
$nearest_servicepoints_results = null;
$nearest_servicepoints = $client->getNearestServicepoints( $params ); // phpcs:ignore
if ( isset( $nearest_servicepoints ) && isset( $nearest_servicepoints->getNearestServicepointsResult ) ) { // phpcs:ignore
$nearest_servicepoints_results = $nearest_servicepoints->getNearestServicepointsResult; // phpcs:ignore
}
$nearest_servicepoints_array = [];
if ( isset( $nearest_servicepoints_results ) && isset( $nearest_servicepoints_results->points ) && isset( $nearest_servicepoints_results->points->item ) ) {
$points = $nearest_servicepoints_results->points->item;
if ( ! is_array( $nearest_servicepoints_array ) ) {
$points = [ $nearest_servicepoints_array ];
}
foreach ( $points as $point ) {
if ( $point->type === 'PAKETSHOP' || $point->type === 'PARCELSHOP' ) {
$point->id = $point->sap . ':' . $point->address->postcode;
$nearest_servicepoints_array[ $point->id ] = $point;
}
}
uasort( $nearest_servicepoints_array, [ $this, 'cmp_servicepoints' ] );
}
set_transient( $transient_key, $nearest_servicepoints_array, $nearest_servicepoints_download_interval ); // Day.
}
return $nearest_servicepoints_array;
}
}
}

View File

@@ -0,0 +1,233 @@
<?php
use VendorDHL\Psr\Log\LoggerInterface;
use WPDesk\DHL\HelperTrait;
if ( ! defined( 'ABSPATH' ) ) {
exit;
} // Exit if accessed directly
if ( ! class_exists( 'WPDesk_WooCommerce_DHL_Parcelshop_API' ) ) {
/**
* DHL Parcelshop API.
*/
class WPDesk_WooCommerce_DHL_Parcelshop_API {
use HelperTrait;
/**
* @var string
*/
private $login;
/**
* @var string
*/
private $password;
/**
* @var bool
*/
private $test_api;
/**
* @var array
*/
private $auth_data;
/**
* @var bool|SoapClient
*/
private $client = false;
/**
* @var LoggerInterface
*/
private $logger;
/**
* @param string $login .
* @param string $password .
* @param LoggerInterface $logger .
* @param bool $test_api .
*/
public function __construct( $login, $password, $logger, $test_api = false ) {
$this->login = $login;
$this->password = $password;
$this->test_api = $test_api;
$this->auth_data = [
'username' => $login,
'password' => $password,
];
$this->logger = $logger;
}
public function get_client() {
if ( ! $this->client ) {
$dhl_webapi_url = 'https://dhl24.com.pl/servicepoint';
if ( $this->test_api ) {
$dhl_webapi_url = 'https://sandbox.dhl24.com.pl/servicepoint';
}
$this->client = new \VendorDHL\WPDesk\SOAP\SoapClientWithLogger(
new SoapClient(
$dhl_webapi_url,
[
'keep-alive' => true,
'connection_timeout' => 30,
'trace' => 1,
]
),
$this->logger,
2000
);
}
return $this->client;
}
public function ping() {
$client = $this->get_client();
$params = [
'structure' => [
'authData' => $this->auth_data,
'postcode' => '53031',
'city' => 'Wrocław',
'radius' => 1,
],
];
$transient_key = $this->prepare_transient_key( $params, __METHOD__ );
$ret = get_transient( $transient_key );
if ( false === $ret ) {
$ret = $client->getNearestServicepoints( $params );
$ten_minutes = 60 * 10;
set_transient( $transient_key, $ret, $ten_minutes );
}
return $ret;
}
public function create_shipment( $shipment ) {
$client = $this->get_client();
$params = [
'shipment' => [
'authData' => $this->auth_data,
'shipmentData' => $shipment,
],
];
return $client->createShipment( $params );
}
public function get_nearest_servicepoints( $postcode = '00001', $radius = 5000, $is_cod = false, $country = '', $city = '' ) {
if ( $radius === 5000 ) {
$postcode = '00001';
}
$postcode = str_replace( '-', '', $postcode );
$params = [
'structure' => [
'authData' => $this->auth_data,
'postcode' => $postcode,
'radius' => $radius,
'country' => $country,
'city' => $city,
],
];
$params_for_cache = array_merge(
$params,
[
'test' => $this->test_api,
'is_cod' => $is_cod,
'version' => WOOCOMMERCE_DHL_VERSION,
]
);
$transient_key = $this->prepare_transient_key( $params_for_cache, __METHOD__ );
$nearest_servicepoints_array = get_transient( $transient_key );
$nearest_servicepoints_download_interval = 60 * 60 * 24;
if ( ! $nearest_servicepoints_array ) {
$client = $this->get_client();
$nearest_servicepoints_results = null;
if ( $is_cod ) {
$nearest_servicepoints = $client->getNearestServicepointsCOD( $params ); // phpcs:ignore
if ( isset( $nearest_servicepoints ) && isset( $nearest_servicepoints->getNearestServicepointsCODResult ) ) { // phpcs:ignore
$nearest_servicepoints_results = $nearest_servicepoints->getNearestServicepointsCODResult; // phpcs:ignore
}
} else {
$nearest_servicepoints = $client->getNearestServicepoints( $params ); // phpcs:ignore
if ( isset( $nearest_servicepoints ) && isset( $nearest_servicepoints->getNearestServicepointsResult ) ) { // phpcs:ignore
$nearest_servicepoints_results = $nearest_servicepoints->getNearestServicepointsResult; // phpcs:ignore
}
}
$nearest_servicepoints_array = [];
if ( isset( $nearest_servicepoints_results ) && isset( $nearest_servicepoints_results->points ) && isset( $nearest_servicepoints_results->points->item ) ) {
$points = $nearest_servicepoints_results->points->item;
if ( ! is_array( $points ) ) {
$points = [ $points ];
}
foreach ( $points as $point ) {
$point->id = $point->sap;
$nearest_servicepoints_array[ $point->id ] = $point;
}
setlocale( LC_ALL, 'pl_PL' );
uasort( $nearest_servicepoints_array, [ $this, 'cmp_servicepoints' ] );
}
set_transient( $transient_key, $nearest_servicepoints_array, $nearest_servicepoints_download_interval ); // Day.
}
return $nearest_servicepoints_array;
}
public function get_service_point( $service_point, $post_code, $radius, $is_cod = false, $country = '', $city = '' ) {
try {
try {
$all_items = $this->get_nearest_servicepoints( $post_code, $radius, $is_cod, $country, $city );
} catch ( Exception $e ) {
$this->logger->log( $e->getMessage() );
}
foreach ( $all_items as $item ) {
if ( $item->sap == $service_point ) {
return $item;
}
}
return '';
} catch ( Exception $e ) {
error_log( "Exception {$e->getMessage()} in DHL::get_service_point" );
return '';
}
}
public function get_label( $shipment_id, $label_format ) {
$client = $this->get_client();
$params = [
'structure' => [
'authData' => $this->auth_data,
'shipment' => $shipment_id,
'type' => $label_format,
],
];
return $client->getLabel( $params );
}
public function delete_shipment( $shipment_id ) {
$client = $this->get_client();
$params = [
'shipment' => [
'authData' => $this->auth_data,
'shipment' => $shipment_id,
],
];
return $client->deleteShipment( $params );
}
}
}

View File

@@ -0,0 +1,8 @@
<?php
/**
* Exception Invalid Address.
*/
class WPDesk_WooCommerce_DHL_Invalid_Address_Exception extends \RuntimeException {
}

View File

@@ -0,0 +1,161 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
if ( ! class_exists( 'WPDesk_WooCommerce_DHL_Flexible_Printing_Integration' ) ) {
class WPDesk_WooCommerce_DHL_Flexible_Printing_Integration extends Flexible_Printing_Integration {
private $plugin = null;
public function __construct( WooCommerce_DHL_Plugin $plugin ) {
$this->plugin = $plugin;
$this->id = 'dhl';
$this->title = 'DHL';
add_action( 'woocommerce_dhl_shipment_created', array( $this, 'woocommerce_dhl_shipment_created' ), 10, 2 );
add_action( 'flexible_shipping_shipping_actions_html', array( $this, 'flexible_shipping_shipping_actions_html' ) );
add_action( 'flexible_shipping_shipment_status_updated', array( $this, 'flexible_shipping_shipment_status_updated' ), 10, 3 );
}
/**
* @param $old_status string
* @param $new_status string
* @param $shipment WPDesk_Flexible_Shipping_Shipment|WPDesk_Flexible_Shipping_Shipment_Interface
*/
public function flexible_shipping_shipment_status_updated( $old_status, $new_status, $shipment ) {
if ( $new_status != $old_status && $new_status == 'fs-confirmed' && $shipment->get_integration() == 'dhl' ) {
$all_shipping_methods = WC()->shipping()->get_shipping_methods();
$shipping_method = $all_shipping_methods['dhl'];
if ( $shipping_method->get_option( 'auto_print', 'no' ) == 'yes'
) {
try {
$label_data = $shipment->get_label();
$content_type = 'application/pdf';
if ( $label_data['label_format'] ) {
$content_type = 'application/' . $label_data['label_format'];
}
$this->do_print(
$label_data['file_name'],
$label_data['content'],
$content_type,
false
);
}
catch ( Exception $e) {
error_log( 'DHL flexible_shipping_shipment_status_updated: ' . $e->getMessage() );
}
}
}
}
public function woocommerce_dhl_shipment_created( WC_Order $order, $shipment ) {
$shipping_method = $this->plugin->dhl->get_shipping_method();
if ( $shipping_method->get_option( 'auto_print', 'no' ) == 'yes'
) {
$label_data = $this->plugin->dhl->get_label( $shipment->createShipmentsResult->item->shipmentId );
try {
$content_type = 'application/pdf';
if ( $label_data->getLabelsResult->item->labelType == 'zpl' ) {
$content_type = 'application/zpl';
}
$this->do_print(
'dhl_' . $label_data->getLabelsResult->item->labelType . '_' . $label_data->getLabelsResult->item->labelName,
base64_decode( $label_data->getLabelsResult->item->labelData ),
$content_type,
false
);
}
catch ( Exception $e ) {
error_log( sprintf( __( 'Blad drukowania: %s', 'woocommerce-dhl' ), $e->getMessage() ) );
}
}
}
public function options() {
$options = array();
/*
$options[] = array(
'id' => 'auto_print',
'name' => __('Automatyczne drukowanie', 'woocommerce-dhl'),
'desc' => __('Włącz (po utworzeniu etykieta zostanie automatycznie wydrukowana)', 'woocommerce-dhl'),
'type' => 'checkbox',
'std' => '',
);
*/
return $options;
}
public function do_print_action( $args ) {
if ( !empty( $args['data']['shippment_id'] ) ) {
$shipment = fs_get_shipment( $args['data']['shippment_id'] );
/* @var $shipment WPDesk_Flexible_Shipping_Shipment|WPDesk_Flexible_Shipping_Shipment_Interface */
$label_data = $shipment->get_label();
$args = array(
'title' => $label_data['file_name'],
'content' => $label_data['content'],
'content_type' => 'application/' . $label_data['label_format'],
'silent' => false
);
}
else {
$shipment_id = $args['data']['shipment_id'];
$label_data = $this->plugin->dhl->get_label( $shipment_id );
$content_type = 'application/pdf';
if ($label_data->getLabelsResult->item->labelType == 'ZBLP') {
$content_type = 'application/zpl';
}
$args = array(
'title' => 'dhl_' . $label_data->getLabelsResult->item->labelType . '_' . $label_data->getLabelsResult->item->labelName,
'content' => base64_decode($label_data->getLabelsResult->item->labelData),
'content_type' => $content_type,
'silent' => false
);
}
do_action( 'flexible_printing_print', 'dhl', $args );
}
public function flexible_shipping_shipping_actions_html( $shipping ) {
if ( !empty( $shipping['shipment'] ) ) {
$shipment = $shipping['shipment'];
/* @var $shipment WPDesk_Flexible_Shipping_Shipment|WPDesk_Flexible_Shipping_Shipment_Interface */
if ( $shipment->get_meta( '_integration', '' ) == 'dhl' ) {
if ( $shipment->get_label_url() != null ) {
echo apply_filters( 'flexible_printing_print_button', '', 'dhl',
array(
'content' => 'print',
'icon' => true,
'id' => $shipment->get_meta('_dhl_package_number' ),
'tip' => __( 'Drukuj na: %s', 'woocommerce-dhl' ),
'data' => array(
'shippment_id' => $shipment->get_id(),
'dhl_package_number' => $shipment->get_meta('_dhl_package_number' ),
),
)
);
}
}
}
/* stare rozwiązanie */
else if ( isset( $shipping['integration'] ) && $shipping['integration'] == 'dhl' ) {
$package = $shipping['integration_data'];
if ( $package['dhl_status'] == 'ok' ) {
echo apply_filters( 'flexible_printing_print_button', '', 'dhl',
array(
'content' => 'print',
'icon' => true,
'id' => $package['dhl_package']->createShipmentsResult->item->shipmentId,
'tip' => __( 'Drukuj na: %s', 'woocommerce-dhl' ),
'data' => array(
'post_id' => $shipping['order_id'],
'count' => $shipping['count'],
'shipment_id' => $package['dhl_package']->createShipmentsResult->item->shipmentId,
),
)
);
}
}
}
}
}

View File

@@ -0,0 +1,445 @@
<?php
/**
* Class WPDesk_WooCommerce_DHL_FS_Hooks
*/
/**
* Register hooks.
*/
class WPDesk_WooCommerce_DHL_FS_Hooks {
/** @var WooCommerce_DHL_Plugin Plugin Class. */
private $plugin;
/**
* WPDesk_WooCommerce_DHL_FS_Hooks constructor.
*
* @param WooCommerce_DHL_Plugin $plugin .
*/
public function __construct( WooCommerce_DHL_Plugin $plugin ) {
$this->plugin = $plugin;
add_filter(
'flexible_shipping_integration_options',
array( $this, 'flexible_shipping_integration_options' ),
10
);
add_filter(
'flexible_shipping_method_settings',
array( $this, 'flexible_shipping_method_settings' ),
10,
2
);
add_action( 'flexible_shipping_method_script', array( $this, 'flexible_shipping_method_script' ) );
add_filter(
'flexible_shipping_process_admin_options',
array( $this, 'flexible_shipping_process_admin_options' ),
10,
1
);
add_filter(
'flexible_shipping_method_integration_col',
array( $this, 'flexible_shipping_method_integration_col' ),
10,
2
);
add_filter( 'flexible_shipping_method_rate_id', array( $this, 'flexible_shipping_method_rate_id' ), 10, 2 );
add_filter( 'flexible_shipping_add_method', array( $this, 'flexible_shipping_add_method' ), 10, 3 );
add_filter( 'flexible_shipping_shipping_data', array( $this, 'flexible_shipping_shipping_data' ), 10, 2 );
add_filter( 'flexible_shipping_bulk_send', array( $this, 'flexible_shipping_bulk_send' ), 10, 2 );
add_filter( 'flexible_shipping_bulk_label', array( $this, 'flexible_shipping_bulk_label' ), 10, 2 );
add_action(
'flexible_shipping_shipment_confirmed',
array( $this, 'flexible_shipping_shipment_confirmed' ),
10,
2
);
}
/**
* .
*
* @param WPDesk_Flexible_Shipping_Shipment $shipment .
*/
public function flexible_shipping_shipment_confirmed( WPDesk_Flexible_Shipping_Shipment $shipment ) {
if ( $shipment->get_meta( '_integration', '' ) != 'dhl' ) {
return;
}
$all_shipping_methods = WC()->shipping()->get_shipping_methods();
$shipping_method = $all_shipping_methods['dhl'];
if ( $shipping_method->get_option( 'complete_order', 'no' ) == 'yes' ) {
$order = $shipment->get_order();
$order->update_status( 'completed', __( 'Status zmieniony automatycznie po utworzeniu przesyłki - wtyczka DHL.', 'woocommerce-dhl' ) );
}
}
/**
* .
*
* @param array $options .
*
* @return array
*/
function flexible_shipping_integration_options( $options ) {
$options['dhl'] = __( 'DHL', 'woocommerce-dhl' );
return $options;
}
/**
* .
*
* @param array $flexible_shipping_settings .
* @param array $shipping_method .
*
* @return array
*/
public function flexible_shipping_method_settings( $flexible_shipping_settings, $shipping_method ) {
$shipping_methods = WC()->shipping->get_shipping_methods();
if ( 1 == 1 || 'yes' === $shipping_methods['dhl']->enabled ) {
$insurance_custom_attributes = array();
if ( isset( $shipping_method['dhl_insurance'] ) && '1' === $shipping_method['dhl_insurance'] ) {
$insurance_custom_attributes = array( 'checked' => 'checked' );
}
$cod_custom_attributes = array();
if ( isset( $shipping_method['dhl_cod'] ) && '1' === $shipping_method['dhl_cod'] ) {
$cod_custom_attributes = array( 'checked' => 'checked' );
}
$dhl_package_nonstandard_custom_attributes = array();
if ( isset( $shipping_method['dhl_package_nonstandard'] ) && 1 === (int) $shipping_method['dhl_package_nonstandard'] ) {
$dhl_package_nonstandard_custom_attributes = array( 'checked' => 'checked' );
}
$settings = array(
'dhl_product' => array(
'title' => __( 'Usługa DHL', 'woocommerce-dhl' ),
'type' => 'select',
'default' => isset( $shipping_method['dhl_product'] ) ? $shipping_method['dhl_product'] : '',
'options' => WPDesk_WooCommerce_DHL::get_products(),
),
'dhl_package_type' => array(
'title' => __( 'Rodzaj przesyłki', 'woocommerce-dhl' ),
'type' => 'select',
'default' => isset( $shipping_method['dhl_package_type'] ) ? $shipping_method['dhl_package_type'] : '',
'options' => WPDesk_WooCommerce_DHL::get_package_types(),
),
'dhl_package_nonstandard' => array(
'title' => __( 'Przesyłka niestandardowa', 'woocommerce-dhl' ),
'label' => __( 'Przesyłka niestandardowa (NST)', 'woocommerce-dhl' ),
'type' => 'checkbox',
'desc_tip' => true,
'description' => __( 'Zaznacz tą opcję jeżeli wysyłane przez Ciebie produkty lub ich opakowania kwalifikują się na przesyłkę niestandardową.', 'woocommerce-dhl' ),
'custom_attributes' => $dhl_package_nonstandard_custom_attributes,
),
'dhl_insurance' => array(
'title' => __( 'Ubezpieczenie', 'woocommerce-dhl' ),
'type' => 'checkbox',
'custom_attributes' => $insurance_custom_attributes,
),
'dhl_cod' => array(
'title' => __( 'Pobranie', 'woocommerce-dhl' ),
'type' => 'checkbox',
'custom_attributes' => $cod_custom_attributes,
),
'dhl_services' => array(
'title' => __( 'Usługi dodatkowe', 'woocommerce-dhl' ),
'type' => 'multiselect',
'class' => 'wc-enhanced-select',
'default' => isset( $shipping_method['dhl_services'] ) ? $shipping_method['dhl_services'] : array(),
'options' => WPDesk_WooCommerce_DHL::get_services(),
'desc_tip' => __( 'Wybierz dostępne opcje dodatkowe dla wskazanej usługi DHL.', 'woocommerce-dhl' ),
'description' => sprintf(
__( 'Niektóre usługi dodatkowe mogą być dostępne jedynie dla wybranych kodów pocztowych. %sDowiedz się więcej o usługach dodatkowych DHL &rarr;%s', 'woocommerce-dhl' ),
'<a href="https://www.dhl.com/pl-pl/home/nasze-dywizje/parcel/dla-ciebie/wysylka/uslugi-dodatkowe.html" target="_blank">',
'</a>'
),
),
);
return array_merge( $flexible_shipping_settings, $settings );
}
return $flexible_shipping_settings;
}
/**
* Add JS scripts.
*/
public function flexible_shipping_method_script() {
?>
<script type="text/javascript">
jQuery( document ).ready( function () {
function dhlOptions() {
if ( jQuery( '#woocommerce_flexible_shipping_method_integration' ).val() === 'dhl' ) {
jQuery( '#woocommerce_flexible_shipping_dhl_product' ).closest( 'tr' ).css( 'display', 'table-row' );
jQuery( '#woocommerce_flexible_shipping_dhl_package_type' ).closest( 'tr' ).css( 'display', 'table-row' );
jQuery( '#woocommerce_flexible_shipping_dhl_insurance' ).closest( 'tr' ).css( 'display', 'table-row' );
jQuery( '#woocommerce_flexible_shipping_dhl_cod' ).closest( 'tr' ).css( 'display', 'table-row' );
jQuery( '#woocommerce_flexible_shipping_dhl_services' ).closest( 'tr' ).css( 'display', 'table-row' );
jQuery( '#woocommerce_flexible_shipping_dhl_package_nonstandard' ).closest( 'tr' ).css( 'display', 'table-row' );
} else {
jQuery( '#woocommerce_flexible_shipping_dhl_product' ).closest( 'tr' ).css( 'display', 'none' );
jQuery( '#woocommerce_flexible_shipping_dhl_package_type' ).closest( 'tr' ).css( 'display', 'none' );
jQuery( '#woocommerce_flexible_shipping_dhl_insurance' ).closest( 'tr' ).css( 'display', 'none' );
jQuery( '#woocommerce_flexible_shipping_dhl_cod' ).closest( 'tr' ).css( 'display', 'none' );
jQuery( '#woocommerce_flexible_shipping_dhl_services' ).closest( 'tr' ).css( 'display', 'none' );
jQuery( '#woocommerce_flexible_shipping_dhl_package_nonstandard' ).closest( 'tr' ).css( 'display', 'none' );
}
}
function dhl_shipping_product() {
if ( jQuery( '#woocommerce_flexible_shipping_method_integration' ).val() === 'dhl' ) {
if ( jQuery( '#woocommerce_flexible_shipping_dhl_product' ).val() === 'parcelshop' ) {
jQuery( '#woocommerce_flexible_shipping_dhl_services' ).closest( 'tr' ).hide();
} else {
jQuery( '#woocommerce_flexible_shipping_dhl_services' ).closest( 'tr' ).show();
}
}
}
jQuery( '#woocommerce_flexible_shipping_method_integration' ).change( function () {
dhlOptions();
} );
jQuery( '#woocommerce_flexible_shipping_dhl_product' ).change( function () {
dhlOptions();
dhl_shipping_product();
} );
dhlOptions();
dhl_shipping_product();
} );
</script>
<?php
}
/**
* .
*
* @param array $shipping_method .
*
* @return array
*/
public function flexible_shipping_process_admin_options( $shipping_method ) {
$shipping_methods = WC()->shipping->get_shipping_methods();
$shipping_method['dhl_product'] = $_POST['woocommerce_flexible_shipping_dhl_product'];
$shipping_method['dhl_package_type'] = $_POST['woocommerce_flexible_shipping_dhl_package_type'];
$shipping_method['dhl_insurance'] = 0;
if ( isset( $_POST['woocommerce_flexible_shipping_dhl_insurance'] ) ) {
$shipping_method['dhl_insurance'] = $_POST['woocommerce_flexible_shipping_dhl_insurance'];
}
$shipping_method['dhl_cod'] = 0;
if ( isset( $_POST['woocommerce_flexible_shipping_dhl_cod'] ) ) {
$shipping_method['dhl_cod'] = $_POST['woocommerce_flexible_shipping_dhl_cod'];
}
$shipping_method['dhl_package_nonstandard'] = (int) isset( $_POST['woocommerce_flexible_shipping_dhl_package_nonstandard'] );
$shipping_method['dhl_services'] = array();
if ( isset( $_POST['woocommerce_flexible_shipping_dhl_services'] ) ) {
$shipping_method['dhl_services'] = array_map( 'sanitize_text_field', wp_unslash( $_POST['woocommerce_flexible_shipping_dhl_services'] ) );
}
return $shipping_method;
}
/**
* .
*
* @param string $col .
* @param array $shipping_method .
*
* @return string
*/
public function flexible_shipping_method_integration_col( $col, $shipping_method ) {
$shipping_methods = WC()->shipping->get_shipping_methods();
if ( 'yes' === $shipping_methods['dhl']->enabled ) {
if ( isset( $shipping_method['method_integration'] ) && 'dhl' === $shipping_method['method_integration'] ) {
ob_start();
$tip = __( 'Brak', 'woocommerce-dhl' );
$products = WPDesk_WooCommerce_DHL::get_products();
if ( isset( $products[ $shipping_method['dhl_product'] ] ) ) {
$tip = $products[ $shipping_method['dhl_product'] ];
}
$package_types = WPDesk_WooCommerce_DHL::get_package_types();
if ( isset( $package_types[ $shipping_method['dhl_package_type'] ] ) ) {
$tip .= ', ' . $package_types[ $shipping_method['dhl_package_type'] ];
}
?>
<td width="1%" class="integration default">
<span class="tips" data-tip="<?php echo esc_attr( $tip ); ?>">
<?php echo $shipping_methods['dhl']->title; ?>
</span>
</td>
<?php
$col = ob_get_contents();
ob_end_clean();
}
}
return $col;
}
/**
* .
*
* @param string $rate_id .
* @param array $shipping_method .
*
* @return string
*/
public function flexible_shipping_method_rate_id( $rate_id, $shipping_method ) {
if ( isset( $shipping_method['method_integration'] ) && 'dhl' === $shipping_method['method_integration'] ) {
$rate_id = $rate_id . '_dhl_' . sanitize_title( $shipping_method['dhl_product'] ) . '_' . $shipping_method['dhl_package_type'] . '_' . $shipping_method['dhl_insurance'];
if ( isset( $shipping_method['dhl_cod'] ) ) {
$rate_id .= '_' . $shipping_method['dhl_cod'];
}
}
return $rate_id;
}
/**
* .
*
* @param string $add_method .
* @param array $shipping_method .
* @param array $package .
*
* @return mixed
*/
public function flexible_shipping_add_method( $add_method, $shipping_method, $package ) {
if ( isset( $shipping_method['method_integration'] ) && 'dhl' === $shipping_method['method_integration']
&& isset( $shipping_method['dhl_product'] )
) {
}
return $add_method;
}
/**
* .
*
* @param array $shippings .
*
* @return array
*/
public function flexible_shipping_shipping_data( $shippings, $order = null ) {
global $post, $the_order;
$order = wc_get_order( $order ?? $the_order ?? 0 );
if ( ! $order ) {
return $shippings;
}
$_dhl = wpdesk_get_order_meta( $order, '_dhl', true );
if ( is_array( $_dhl ) ) {
$count = 0;
foreach ( $_dhl as $key => $dhl_package ) {
$count ++;
$shipping = array();
$shipping['url'] = admin_url( 'post.php?post=' . $post->ID . '&action=edit#dhl_metabox"' );
if ( isset( $dhl_package['dhl_status'] ) ) {
if ( $dhl_package['dhl_status'] == 'ok' ) {
$shipping['order_id'] = $post->ID;
$shipping['count'] = $count;
$shipping['integration'] = 'dhl';
$shipping['integration_data'] = $dhl_package;
$shipping['status'] = 'confirmed';
$shipping['tracking_number'] = $dhl_package['dhl_package_number'];
$label_url = admin_url( 'admin-ajax.php?action=wpdesk_dhl&dhl_action=get_label&security=' );
$label_url .= wp_create_nonce( 'dhl_ajax_nonce', 'dhl_ajax_nonce' );
$label_url .= '&shipment_id=' . $dhl_package['dhl_package_number'];
$label_url .= '&post_id=' . $post->ID;
$label_url .= '&key=' . $key;
$shipping['label_url'] = $label_url;
$shipping['tracking_url'] = 'http://www.dhl.com.pl/sledzenieprzesylkikrajowej/szukaj.aspx?m=0&sn=' . $dhl_package['dhl_package_number'];
}
if ( $dhl_package['dhl_status'] == 'error' ) {
$shipping['status'] = 'error';
$shipping['error'] = $dhl_package['dhl_message'];
}
} else {
$shipping['status'] = 'new';
}
$shippings[] = $shipping;
}
}
return $shippings;
}
/**
* @param string $message .
* @param int $post_id .
*
* @return array
*/
public function flexible_shipping_bulk_send( $message, $post_id ) {
$order = wc_get_order( $post_id );
$_dhl = wpdesk_get_order_meta( $order, '_dhl', true );
if ( is_array( $_dhl ) ) {
try {
$this->plugin->dhl->create_shipments( $order );
return array(
'status' => 'created',
'message' => __( 'Przesyłka została utworzona.', 'paczkomaty_shipping_method' ),
);
} catch ( Exception $e ) {
return array( 'status' => 'error', 'message' => $e->getMessage(), );
}
}
return $message;
}
/**
* .
*
* @param array $labels .
* @param int $post_id .
*
* @return mixed
*/
public function flexible_shipping_bulk_label( $labels, $post_id ) {
$order = wc_get_order( $post_id );
$_dhl = wpdesk_get_order_meta( $order, '_dhl', true );
if ( is_array( $_dhl ) ) {
foreach ( $_dhl as $key => $dhl_package ) {
if ( isset( $dhl_package['dhl_status'] ) ) {
if ( $dhl_package['dhl_status'] == 'ok' ) {
$shipment_id = $dhl_package['dhl_package']->createShipmentsResult->item->shipmentId;
try {
$label_data = $this->plugin->dhl->get_label( $shipment_id );
$labels[] = array(
'message' => __( 'Etykieta została pobrana.', 'paczkomaty_shipping_method' ),
'content' => base64_decode( $label_data->getLabelsResult->item->labelData ),
'file_name' => 'dhl_' . $label_data->getLabelsResult->item->labelName
);
} catch ( Exception $e ) {
$labels[] = array( 'status' => 'error', 'message' => $e->getMessage() );
}
}
} else {
$labels[] = array(
'status' => 'error',
'message' => __( 'Przesyłka nie została odnaleziona (1).', 'woocommerce-dhl' )
);
}
}
}
return $labels;
}
}

View File

@@ -0,0 +1,35 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
if ( class_exists( 'WPDesk_Flexible_Shipping_Manifest' ) ) {
class WPDesk_Flexible_Shipping_Manifest_dhl extends WPDesk_Flexible_Shipping_Manifest implements WPDesk_Flexible_Shipping_Manifest_Interface {
public function __construct( $manifest ) {
parent::__construct( $manifest );
}
public function get_number() {
return $this->get_meta( '_number' );
}
public function get_manifest() {
$manifest = array(
'file_name' => 'inpost_manifest_' . $this->get_number() . '.pdf',
'content' => file_get_contents( ABSPATH . '/wp-content/plugins/woocommerce-paczkomaty-inpost/class/manifest.pdf' )
);
return $manifest;
}
public function generate() {
$this->set_meta( '_number', rand(1,10000000) );
}
public function cancel() {
$this->delete_meta( '_number' );
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,121 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
/**
* Class WPDesk_WooCommerce_DHL_Select_Parcels_Via_Ajax
*/
class WPDesk_WooCommerce_DHL_Select_Parcels_Via_Ajax {
/** @var WPDesk_WooCommerce_DHL $shipping_method */
private $shipping_method = null;
/** @var array */
private $parcels;
/** @var array */
private $requests;
/** @var string */
private $nonce_name;
/** @var int */
const MIN_LENGTH = 3;
/**
* WPDesk_WooCommerce_DHL_Select_Machines_Via_Ajax constructor.
*
* @param WPDesk_WooCommerce_DHL $shipping_method
* @param string $nonce_name
*/
public function __construct( WPDesk_WooCommerce_DHL $shipping_method, $nonce_name ) {
$this->shipping_method = $shipping_method;
$this->nonce_name = $nonce_name;
}
/**
* Fires hooks.
*
*/
public function hooks() {
add_action( 'wp_ajax_dhl_search_machines_via_ajax', array( $this, 'wp_ajax_dhl_search_parcels_via_ajax') );
add_action( 'wp_ajax_nopriv_dhl_search_machines_via_ajax', array( $this, 'wp_ajax_dhl_search_parcels_via_ajax') );
}
/**
* Execute AJAX request
*
* @return void
*/
public function wp_ajax_dhl_search_parcels_via_ajax() {
check_ajax_referer( 'woocommerce-dhl', 'security' );
$all_parcels = array();
$this->requests = new WPDesk_WooCommerce_DHL_Ajax_Request( $this->nonce_name, $_POST );
$this->parcels = $this->get_list_of_parcels();
$sap = $this->requests->getCode();
$all_parcels['items'] = $this->get_parcel_by_city();
if ( ! empty( $sap ) && isset( $this->parcels[ $sap ] ) ) {
wp_send_json( array( 'id' => $sap, 'text' => $this->parcels[ $sap ] ) );
}
wp_send_json( $all_parcels );
}
/**
* Append parcels.
*
* @param array $parcels Parcels.
* @param array $parcels_to_append Parcels to append.
*
* @return array
*/
private function append_parcels( array $parcels, array $parcels_to_append ) {
foreach ( $parcels_to_append as $key => $value ) {
$parcels[ $key ] = $value;
}
return $parcels;
}
/**
* Return a list of parcels
*
* @return array
*/
public function get_list_of_parcels() {
$list_of_parcels = $this->shipping_method->getListOfParcels();
return $this->append_parcels(
$this->append_parcels( array(), isset( $list_of_parcels['dhl_parcelshop_nearest'] ) ? $list_of_parcels['dhl_parcelshop_nearest'] : array() ),
isset( $list_of_parcels['dhl_parcelshop_other'] ) ? $list_of_parcels['dhl_parcelshop_other'] : array()
);
}
/**
* Return a list of parcels for city request
*
* @return array
*/
public function get_parcel_by_city() {
if ( strlen( $this->requests->getCity() ) >= self::MIN_LENGTH ) {
$items = array();
$phrase = explode( ' ', $this->requests->getCity() );
$phrase = str_replace(',', '', $phrase );
$pattern = '/^.+(' . implode( ').+(', $phrase ) . ').+/iu';
$results = preg_grep( $pattern, $this->parcels );
foreach ( $results as $key => $item ) {
$items[] = array(
'id' => $key,
'text' => $item,
);
}
return $items;
}
return array();
}
}

View File

@@ -0,0 +1,214 @@
<?php
use VendorDHL\WPDesk\WooCommerceShippingMethod\Field\ApiConnectionStatus\ApiConnectionRenderer;
use VendorDHL\WPDesk\WooCommerceShippingMethod\Field\ApiConnectionStatus\HasApiConnectionStatusField;
if ( ! defined( 'ABSPATH' ) ) {
exit;
} // Exit if accessed directly
if ( ! class_exists( 'WPDesk_WooCommerce_DHL_Shipping_Method' ) ) {
/**
* Shipping Method class.
*/
class WPDesk_WooCommerce_DHL_Shipping_Method extends WC_Shipping_Method implements HasApiConnectionStatusField {
use ApiConnectionRenderer;
const OPTION_LOGGING = 'logging';
const METHOD_ID = 'dhl';
/**
* @var bool|WPDesk_WooCommerce_DHL_API
*/
public $api = false;
/**
* @var bool|WPDesk_WooCommerce_DHL_Parcelshop_API
*/
public $parcelshop_api = false;
/**
* @var mixed
*/
private $login;
/**
* @var mixed
*/
private $password;
/**
* @var mixed
*/
private $api_key;
/**
* @var mixed
*/
private $test_mode;
/**
* @var mixed
*/
private $login_parcelshop;
/**
* @var mixed
*/
private $password_parcelshop;
/**
* @var mixed
*/
private $cost;
/**
* @var mixed
*/
private $cost_cod;
/**
* Constructor for your shipping class.
*
* @return void
*/
public function __construct( $instance_id = 0 ) {
$this->instance_id = absint( $instance_id );
$this->id = self::METHOD_ID;
$this->method_title = __( 'DHL', 'woocommerce-dhl' );
$this->method_description = __( 'Integracja WooCommerce z DHL. <a href="https://www.wpdesk.pl/docs/woocommerce-dhl-docs/" target="_blank">Zapoznaj się z instrukcją obsługi &rarr;</a>', 'woocommerce-dhl' );
$this->enabled = 'yes';
$this->title = __( 'DHL', 'woocommerce-dhl' );
$this->settings['enabled'] = 'yes';
$this->init();
add_action( 'woocommerce_update_options_shipping_' . $this->id, [ $this, 'process_admin_options' ] );
}
/**
* Init your settings.
*
* @return void
*/
public function init() {
// Load the settings API.
$this->init_settings();
$this->init_form_fields();
// Define user set variables.
$this->login = $this->get_option( 'login' );
$this->password = $this->get_option( 'password' );
$this->api_key = $this->get_option( 'api_key' );
$this->test_mode = $this->get_option( 'test_mode', 'no' );
$this->login_parcelshop = $this->get_option( 'login_parcelshop' );
$this->password_parcelshop = $this->get_option( 'password_parcelshop' );
$this->cost = $this->get_option( 'cost' );
$this->cost_cod = $this->get_option( 'cost_cod' );
}
/**
* @return WPDesk_WooCommerce_DHL_API
*/
public function get_api() {
if ( ! $this->api ) {
$this->api = new WPDesk_WooCommerce_DHL_API( $this->login, $this->password, $this->get_logger(), $this->test_mode === 'yes' );
}
return $this->api;
}
/**
*
*/
private function get_logger() {
if ( $this->get_option( self::OPTION_LOGGING, 'no' ) === 'yes' ) {
$logger = ( new \VendorDHL\WPDesk\Logger\WPDeskLoggerFactory() )->createWPDeskLogger();
} else {
$logger = new \VendorDHL\Psr\Log\NullLogger();
}
return $logger;
}
/**
* @return WPDesk_WooCommerce_DHL_Parcelshop_API
*/
public function get_parcelshop_api() {
if ( ! $this->parcelshop_api && ! empty( $this->login_parcelshop ) && ! empty( $this->password_parcelshop ) ) {
$this->parcelshop_api = new WPDesk_WooCommerce_DHL_Parcelshop_API( $this->login_parcelshop, $this->password_parcelshop, $this->get_logger(), $this->test_mode === 'yes' );
}
return $this->parcelshop_api;
}
/**
* Initialise Settings Form Fields.
*/
public function init_form_fields() {
$this->form_fields = include( 'settings-dhl.php' );
}
/**
* @param array $form_fields .
* @param false $echo .
*
* @return void
*/
public function generate_settings_html( $form_fields = [], $echo = false ) {
parent::generate_settings_html( $form_fields );
?>
<script type="text/javascript">
jQuery( document ).ready( function () {
function dhl_order_status() {
if ( jQuery( '#woocommerce_dhl_auto_create' ).val() === 'auto' ) {
jQuery( '#woocommerce_dhl_order_status' ).closest( 'tr' ).show();
} else {
jQuery( '#woocommerce_dhl_order_status' ).closest( 'tr' ).hide();
}
}
function dhl_permanent_collection() {
if ( jQuery( '#woocommerce_dhl_permanent_collection' ).is( ':checked' ) ) {
jQuery( '#woocommerce_dhl_date_change_hour' ).closest( 'tr' ).show();
} else {
jQuery( '#woocommerce_dhl_date_change_hour' ).closest( 'tr' ).hide();
}
}
dhl_permanent_collection();
dhl_order_status();
jQuery( '#woocommerce_dhl_permanent_collection' ).click( function () {
dhl_permanent_collection();
} );
jQuery( '#woocommerce_dhl_auto_create' ).change( function () {
dhl_order_status();
} );
} )
</script>
<?php
}
/**
* @param array $package .
*
* @return void
*/
public function calculate_shipping( $package = [] ) {
}
/**
* @return bool|void
*/
public function process_admin_options() {
parent::process_admin_options();
$api = $this->get_api();
$api->clear_cache();
}
}
}

View File

@@ -0,0 +1,335 @@
<?php
/**
* Plugin.
*
* @package Woocommerce Dhl
*/
use VendorDHL\Octolize\Tracker\TrackerInitializer;
use VendorDHL\WPDesk\PluginBuilder\Plugin\AbstractPlugin;
/**
* Main class for WordPress plugin
*/
class WooCommerce_DHL_Plugin extends AbstractPlugin {
const SELECT_TYPE = 'select_type';
/**
* Plugin path.
*
* @var string
*/
public $plugin_path;
/**
* Template path.
*
* @var string
*/
public $template_path;
/**
* Plugin text domain.
*
* @var string
*/
public $plugin_text_domain;
/**
* Scripts version.
*
* @var string
*/
public $scripts_version = '67';
/**
* DHL.
*
* @var WPDesk_WooCommerce_DHL
*/
public $dhl = null;
/**
* Flexible printing integration.
*
* @var bool
*/
public $flexible_printing_integration = false;
/**
* WooCommerce_DHL_Plugin constructor.
*
* @param \VendorDHL\WPDesk_Plugin_Info $plugin_info .
*/
public function __construct( \VendorDHL\WPDesk_Plugin_Info $plugin_info ) {
$this->plugin_info = $plugin_info;
parent::__construct( $this->plugin_info );
}
/**
* Init base variables for plugin
*/
public function init_base_variables() {
$this->plugin_url = $this->plugin_info->get_plugin_url();
$this->plugin_path = $this->plugin_info->get_plugin_dir();
$this->template_path = $this->plugin_info->get_text_domain();
$this->plugin_text_domain = $this->plugin_info->get_text_domain();
$this->plugin_namespace = $this->plugin_info->get_text_domain();
$this->template_path = $this->plugin_info->get_text_domain();
$this->default_settings_tab = 'main';
$this->settings_url = admin_url( 'admin.php?page=wc-settings&tab=shipping&section=dhl' );
$this->docs_url = get_locale() === 'pl_PL' ? 'https://www.wpdesk.pl/docs/faktury-zaawansowane-raporty-docs' : 'https://www.wpdesk.net/docs/flexible-invoices-advanced-reports-docs/';
$this->default_view_args = [
'plugin_url' => $this->get_plugin_url(),
];
}
/**
* Init plugin
*/
public function init() {
parent::init();
add_action(
'plugins_loaded',
function () {
if ( class_exists( 'WPDesk_Flexible_Shipping_Shipment_dhl' ) ) {
WPDesk_Flexible_Shipping_Shipment_dhl::$_plugin = $this;
$this->dhl = WPDesk_WooCommerce_DHL::get_instance( $this );
new WPDesk_WooCommerce_DHL_FS_Hooks( $this );
$dhl_select_ajax = new WPDesk_WooCommerce_DHL_Select_Parcels_Via_Ajax( $this->dhl, $this->plugin_namespace );
$dhl_select_ajax->hooks();
}
}
);
add_action(
'woocommerce_init',
function () {
$shipping_methods = WC()->shipping()->get_shipping_methods();
if ( isset( $shipping_methods['dhl'] ) ) {
$api_status_ajax = new \WPDesk\DHL\ApiConnectionStatusAjax( $shipping_methods['dhl'] );
$api_status_ajax->hooks();
}
}
);
}
/**
* Hooks.
*/
public function hooks() {
parent::hooks();
TrackerInitializer::create_from_plugin_info_for_shipping_method( $this->plugin_info, WPDesk_WooCommerce_DHL_Shipping_Method::METHOD_ID )->hooks();
add_action( 'admin_notices', [ $this, 'admin_notices' ] );
add_filter( 'flexible_printing_integrations', [ $this, 'flexible_printing_integrations' ] );
}
/**
* .
*
* @param array $integrations .
*
* @return array
*/
public function flexible_printing_integrations( array $integrations ) {
include_once 'class-flexible-printing-integration.php';
$this->flexible_printing_integration = new WPDesk_WooCommerce_DHL_Flexible_Printing_Integration( $this );
$integrations[ $this->flexible_printing_integration->id ] = $this->flexible_printing_integration;
return $integrations;
}
/**
* Enqueue scripts.
*/
public function wp_enqueue_scripts() {
parent::wp_enqueue_scripts();
if ( is_checkout() ) {
$shipping_methods = WC()->shipping()->get_shipping_methods();
$settings = $shipping_methods['dhl']->settings;
$select_type = isset( $settings[ self::SELECT_TYPE ] ) ? $settings[ self::SELECT_TYPE ] : 'select2';
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
wp_register_style( 'dhl_checkout_css', $this->get_plugin_assets_url() . 'css/checkout' . $suffix . '.css', [], $this->scripts_version );
wp_enqueue_style( 'dhl_checkout_css' );
wp_register_style( 'dhl_admin_css', $this->get_plugin_assets_url() . 'css/admin' . $suffix . '.css', [], $this->scripts_version );
wp_enqueue_style( 'dhl_admin_css' );
wp_enqueue_script( 'dhl_checkout_js', $this->get_plugin_assets_url() . 'js/checkout' . $suffix . '.js', [ 'jquery' ], $this->scripts_version, true );
wp_localize_script(
'dhl_checkout_js',
'dhl_checkout_js',
[
'map_url' => site_url( '?dhl_parcelshop_map=1' ),
'parcelshop_not_exists' => __( 'Wskazany punkt odbioru nie istnieje!', 'woocommerce-dhl' ),
'select_type' => $select_type,
'lang' => [
'loadingMore' => __( 'Więcej...', 'woocommerce-dhl' ),
'noResults' => __( 'Brak punktów.', 'woocommerce-dhl' ),
'searching' => __( 'Szukam punktów...', 'woocommerce-dhl' ),
'errorLoading' => __( 'Wyszukiwanie w toku...', 'woocommerce-dhl' ),
'placeholder' => __( 'Wpisz miasto lub miasto, ulica.', 'woocommerce-dhl' ),
'min_chars' => __( 'Wpisz minimum % znaki.', 'woocommerce-dhl' ),
'nomachine' => __( 'Punkt nie istnieje', 'woocommerce-dhl' ),
],
'ajax_nonce' => wp_create_nonce( 'woocommerce-dhl' ),
'l10n' => [
'close_popup' => __( 'Zamknij mapę', 'woocommerce-dhl' ),
],
]
);
}
}
/**
* Admin enqueue scripts.
*/
public function admin_enqueue_scripts() {
$current_screen = get_current_screen();
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
if ( $current_screen && in_array( $current_screen->id, [ 'shop_order', 'edit-shop_order', 'woocommerce_page_wc-orders' ], true ) ) {
wp_register_style( 'dhl_admin_css', $this->get_plugin_assets_url() . 'css/admin' . $suffix . '.css', [], $this->scripts_version );
wp_enqueue_style( 'dhl_admin_css' );
wp_enqueue_script( 'dhl_admin_order_js', $this->get_plugin_assets_url() . 'js/admin-order' . $suffix . '.js', [ 'jquery' ], $this->scripts_version, true );
wp_localize_script(
'dhl_admin_order_js',
'dhl_ajax_object',
[
'ajax_url' => admin_url( 'admin-ajax.php' ),
]
);
/**
* JavaScript i18n support in WordPress 5.0
*
* @link https://make.wordpress.org/core/2018/11/09/new-javascript-i18n-support-in-wordpress/
*/
wp_enqueue_script( 'i18n_dhl_support', $this->get_plugin_assets_url() . 'js/i18n-support.js', [ 'wp-i18n' ], $this->scripts_version, true );
wp_set_script_translations( 'i18n_dhl_support', 'woocommerce-dhl' );
}
}
/**
* Admin notices.
*/
public function admin_notices() {
if ( defined( 'FLEXIBLE_SHIPPING_VERSION' ) ) {
$version_compare = version_compare( FLEXIBLE_SHIPPING_VERSION, '1.9.4' );
if ( $version_compare < 0 ) {
$class = 'notice notice-error';
$message = __( 'Wtyczka WooCommerce DHL wymaga wtyczki Flexible Shipping w wersji nie niższej niż 1.9.4.', 'woocommerce-dhl' );
printf( '<div class="%1$s"><p>%2$s</p></div>', $class, $message ); // wpcs: XSS ok.
}
return;
}
$active_plugins = apply_filters( 'active_plugins', get_option( 'active_plugins' ) );
$slug = 'flexible-shipping';
$install_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=' . $slug ), 'install-plugin_' . $slug );
$activate_url = 'plugins.php?action=activate&plugin=' . urlencode( 'flexible-shipping/flexible-shipping.php' ) . '&plugin_status=all&paged=1&s&_wpnonce=' . urlencode( wp_create_nonce( 'activate-plugin_flexible-shipping/flexible-shipping.php' ) );
$message = sprintf(
wp_kses(
// Translators: url.
__(
'Wtyczka WooCommerce DHL wymaga wtyczki Flexible Shipping. <a href="%s">Zainstaluj Flexible Shipping →</a>',
'woocommerce-dhl'
),
[ 'a' => [ 'href' => [] ] ]
),
esc_url( $install_url )
);
$is_downloaded = false;
$plugins = array_keys( get_plugins() );
foreach ( $plugins as $plugin ) {
if ( strpos( $plugin, 'flexible-shipping/flexible-shipping.php' ) === 0 ) {
$is_downloaded = true;
$message = sprintf(
wp_kses(
// Translators: url.
__( 'Wtyczka WooCommerce DHL wymaga wtyczki Flexible Shipping. <a href="%s">Włącz Flexible Shipping →</a>', 'woocommerce-dhl' ),
[ 'a' => [ 'href' => [] ] ]
),
esc_url( admin_url( $activate_url ) )
);
}
}
echo '<div class="error fade"><p>' . $message . '</p></div>' . "\n"; // WPCS: XSS ok.
}
/**
* Plugin actions links.
*
* @param array $links .
*
* @return array
*/
public function links_filter( $links ) {
$plugin_links = [
'<a href="' . admin_url( 'admin.php?page=wc-settings&tab=shipping&section=dhl' ) . '">' . __( 'Ustawienia', 'woocommerce-dhl' ) . '</a>',
'<a target="_blank" href="https://www.wpdesk.pl/docs/woocommerce-dhl-docs/">' . __( 'Dokumentacja', 'woocommerce-dhl' ) . '</a>',
'<a target="_blank" href="https://www.wpdesk.pl/support/">' . __( 'Wsparcie', 'woocommerce-dhl' ) . '</a>',
];
return array_merge( $plugin_links, $links );
}
/**
* Renders end returns selected template
*
* @param string $name name of the template .
* @param string $path additional inner path to the template .
* @param array $args args accesible from template .
*
* @return string
*/
public function load_template( $name, $path = '', array $args = [] ) {
$plugin_template_path = trailingslashit( $this->plugin_path ) . 'templates/';
// Look within passed path within the theme - this is priority.
$template = locate_template(
[
trailingslashit( $this->get_template_path() ) . trailingslashit( $path ) . $name . '.php',
]
);
if ( ! $template ) {
$template = $plugin_template_path . trailingslashit( $path ) . $name . '.php';
}
extract( $args ); // phpcs:ignore
ob_start();
include $template;
return ob_get_clean();
}
/**
* Get template path.
*
* @return string
*/
public function get_template_path() {
return trailingslashit( $this->template_path );
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,409 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
/**
* Settings for flexible shipping
*/
$options_hours = array(
);
for ( $h = 9; $h < 20; $h++ ) {
$options_hours[$h . ':00'] = $h . ':00';
if ( $h < 19 ) {
$options_hours[$h . ':30'] = $h . ':30';
}
}
$order_statuses = wc_get_order_statuses();
$flexible_printing = apply_filters( 'flexible_printing', false );
$auto_print_description = '';
$auto_print_custom_attributes = array();
if ( $flexible_printing ) {
if ( $this->get_option( 'auto_print', '' ) == 'yes' ) {
$flexible_printing_integration_url = apply_filters( 'flexible_printing_integration_url', 'dhl' );
$auto_print_description = sprintf( __( 'Aby przejść do ustawień wydruku kliknij %stutaj%s.', 'woocommerce-dhl' ), '<a target="_blank" href="' . $flexible_printing_integration_url . '">', '</a>' );
}
else {
$auto_print_description = __( 'Konfiguracja wydruku dostępna po włączeniu opcji i zapisaniu ustawień.', 'woocommerce-dhl' );
}
}
else {
$this->settings['auto_print'] = 'no';
$flexible_printing_buy_url = 'https://www.wpdesk.pl/sklep/flexible-printing/';
$auto_print_description = sprintf(
__( 'Drukuj etykiety bezpośrnio na drukarce (bez pobierania pliku) lub zapisuj automatycznie na dysku. %sKup Flexible Printing &rarr;%s.', 'woocommerce-dhl' ),
'<a href="' . $flexible_printing_buy_url . '" target="_blank">',
'</a>'
);
$auto_print_custom_attributes = array( 'disabled' => 'disabled' );
}
$settings = array(
array(
'title' => __( 'Logowanie DHL 24 API', 'woocommerce-dhl' ),
'type' => 'title',
'description' => '',
),
'login' => array(
'title' => __( 'Login', 'woocommerce-dhl' ),
'type' => 'text',
'description' => __( 'Login do DHL24 API.', 'woocommerce-dhl' ),
'default' => '',
'desc_tip' => true,
'custom_attributes' => array(
'required' => 'required'
)
),
'password' => array(
'title' => __( 'Hasło', 'woocommerce-dhl' ),
'type' => 'password',
'description' => __( 'Hasło do DHL24 API.', 'woocommerce-dhl' ),
'default' => '',
'desc_tip' => true,
'custom_attributes' => array(
'required' => 'required',
'autocomplete' => 'new-password'
)
),
'api_status' => array(
'title' => __( 'Status połączenia', 'woocommerce-dhl' ),
'type' => \VendorDHL\WPDesk\WooCommerceShippingMethod\Field\ApiConnectionStatus\ApiConnectionStatus::FIELD_TYPE,
'description' => __( 'Hasło do DHL24 API.', 'woocommerce-dhl' ),
'default' => '',
'desc_tip' => true,
'custom_attributes' => array(
'required' => 'required',
'autocomplete' => 'new-password'
)
),
array(
'title' => __( 'Logowanie DHL Parcel Shop API', 'woocommerce-dhl' ),
'type' => 'title',
'description' => '',
),
'login_parcelshop' => array(
'title' => __( 'Login', 'woocommerce-dhl' ),
'type' => 'text',
'default' => '',
'desc_tip' => true,
),
'password_parcelshop' => array(
'title' => __( 'Hasło', 'woocommerce-dhl' ),
'type' => 'password',
'description' => __( 'Hasło do DHL Parcelshop API.', 'woocommerce-dhl' ),
'default' => '',
'desc_tip' => true,
),
'api_parcelshop_status' => array(
'title' => __( 'Status połączenia', 'woocommerce-dhl' ),
'type' => \VendorDHL\WPDesk\WooCommerceShippingMethod\Field\ApiConnectionStatus\ApiConnectionStatus::FIELD_TYPE,
'description' => __( 'Hasło do DHL24 API.', 'woocommerce-dhl' ),
'default' => '',
'desc_tip' => true,
'custom_attributes' => array(
'required' => 'required',
'autocomplete' => 'new-password'
)
),
array(
'title' => __( 'Tryb testowy', 'woocommerce-dhl' ),
'type' => 'title',
'description' => '',
),
'test_mode' => array(
'title' => __( 'Tryb testowy', 'woocommerce-dhl' ),
'label' => __( 'Włącz tryb testowy', 'woocommerce-dhl' ),
'type' => 'checkbox',
'description' => __( 'Jeśli włączasz tryb testowy - wpisz Login i Hasło API do serwisu testowego, a nie do produkcyjnego. Serwis testowy dostępny jest pod adresem: <a target="_blank" href="https://sandbox.dhl24.com.pl/">https://sandbox.dhl24.com.pl/</a>', 'woocommerce-dhl' ),
'default' => 'no',
'desc_tip' => false
),
array(
'title' => __( 'Deklaracja stałego zbioru', 'woocommerce-dhl' ),
'type' => 'title',
'description' => '',
),
'permanent_collection' => array(
'title' => __( 'Stały zbiór', 'woocommerce-dhl' ),
'label' => __( 'Włącz', 'woocommerce-dhl' ),
'type' => 'checkbox',
'description' => __( 'Włącz tylko w przypadku, gdy masz podpisaną deklarację stałego zbioru.', 'woocommerce-dhl' ),
'default' => 'no',
'desc_tip' => false
),
'date_change_hour' => array(
'title' => __( 'Godzina, po której nastąpi zmiana daty nadania na następny dzień roboczy', 'woocommerce-dhl' ),
'type' => 'select',
'default' => '14',
'options' => array(
'0' => __( '0', 'woocommerce-dhl' ),
'1' => __( '1', 'woocommerce-dhl' ),
'2' => __( '2', 'woocommerce-dhl' ),
'3' => __( '3', 'woocommerce-dhl' ),
'4' => __( '4', 'woocommerce-dhl' ),
'5' => __( '5', 'woocommerce-dhl' ),
'6' => __( '6', 'woocommerce-dhl' ),
'7' => __( '7', 'woocommerce-dhl' ),
'8' => __( '8', 'woocommerce-dhl' ),
'9' => __( '9', 'woocommerce-dhl' ),
'10' => __( '10', 'woocommerce-dhl' ),
'11' => __( '11', 'woocommerce-dhl' ),
'12' => __( '12', 'woocommerce-dhl' ),
'13' => __( '13', 'woocommerce-dhl' ),
'14' => __( '14', 'woocommerce-dhl' ),
'15' => __( '15', 'woocommerce-dhl' ),
'16' => __( '16', 'woocommerce-dhl' ),
'17' => __( '17', 'woocommerce-dhl' ),
'18' => __( '18', 'woocommerce-dhl' ),
'19' => __( '19', 'woocommerce-dhl' ),
'20' => __( '20', 'woocommerce-dhl' ),
'21' => __( '21', 'woocommerce-dhl' ),
'22' => __( '22', 'woocommerce-dhl' ),
'23' => __( '23', 'woocommerce-dhl' ),
),
),
array(
'title' => __( 'Tworzenie przesyłek', 'woocommerce-dhl' ),
'type' => 'title',
'description' => '',
),
'auto_create' => array(
'title' => __( 'Tworzenie przesyłek', 'woocommerce-dhl' ),
'type' => 'select',
'default' => 'manual',
'options' => array(
'manual' => __( 'Ręczne', 'woocommerce-dhl' ),
'auto' => __( 'Automatyczne', 'woocommerce-dhl' ),
),
),
'order_status' => array(
'title' => __( 'Status zamówienia', 'woocommerce-dhl' ),
'type' => 'select',
'default' => 'wc-completed',
'options' => $order_statuses,
'description' => __( 'Status zamówienia, przy którym do zamówienia zostanie automatycznie utworzona przesyłka.', 'woocommerce-dhl' ),
),
'complete_order' => array(
'title' => __('Zrealizuj zamówienie', 'woocommerce-dhl'),
'type' => 'checkbox',
'label' => __('Włącz zmianę statusu zamówienia na Zrealizowane', 'woocommerce-dhl'),
'default' => 'no',
'description' => __('Po nadaniu przesyłek status zamówienia zostanie automatycznie zmieniony na Zrealizowane.', 'woocommerce-dhl'),
),
array(
'title' => __( 'Domyślne ustawienia przesyłki', 'woocommerce-dhl' ),
'type' => 'title',
'description' => '',
),
'package_width' => array(
'title' => __( 'Długość paczki [cm]', 'woocommerce-dhl' ),
'type' => 'number',
'default' => '',
'custom_attributes' => array(
'min' => 0,
'max' => 10000,
'step' => 1,
'required' => 'required'
)
),
'package_length' => array(
'title' => __( 'Szerokość paczki [cm]', 'woocommerce-dhl' ),
'type' => 'number',
'default' => '',
'custom_attributes' => array(
'min' => 0,
'max' => 10000,
'step' => 1,
'required' => 'required'
)
),
'package_height' => array(
'title' => __( 'Wysokość paczki [cm]', 'woocommerce-dhl' ),
'type' => 'number',
'default' => '',
'custom_attributes' => array(
'min' => 0,
'max' => 10000,
'step' => 1,
'required' => 'required'
)
),
'package_weight' => array(
'title' => __( 'Waga paczki', 'woocommerce-dhl' ),
'type' => 'number',
'default' => '',
'custom_attributes' => array(
'min' => 0,
'max' => 10000,
'step' => 'any',
'required' => 'required'
)
),
'package_contents' => array(
'title' => __( 'Zawartość paczki', 'woocommerce-dhl' ),
'type' => 'text',
'default' => ''
),
'package_comment' => array(
'title' => __( 'Komentarz', 'woocommerce-dhl' ),
'type' => 'text',
'description' => __( 'Komentarz widoczny na etykiecie. Dostępne shortcody [order_number], [shop_name], [shop_url]', 'woocommerce-dhl' ),
'default' => __( 'Zamówienie [order_number], [shop_name], [shop_url]' , 'woocommerce-dhl' ),
'desc_tip' => false,
),
array(
'title' => __( 'Etykiety', 'woocommerce-dhl' ),
'type' => 'title',
'description' => ''
),
'label_format' => array(
'title' => __( 'Format etykiet', 'woocommerce-dhl' ),
'type' => 'select',
'options' => array(
'BLP' => __( 'Etykieta BLP' , 'woocommerce-dhl' ),
'LBLP' => __( 'Etykieta BLP w formacie PDF A4', 'woocommerce-dhl' ),
'ZBLP' => __( 'Etykieta BLP w formacie dla drukarek Zebra', 'woocommerce-dhl' ),
),
'default' => 'LBLP',
),
'auto_print' => array(
'title' => __( 'Drukowanie', 'woocommerce-dhl' ),
'label' => __( 'Włącz automatyczne drukowanie', 'woocommerce-dhl' ),
'type' => 'checkbox',
'description' => $auto_print_description,
'custom_attributes' => $auto_print_custom_attributes,
'default' => 'no',
'desc_tip' => false
),
array(
'title' => __( 'Dane nadawcy', 'woocommerce-dhl' ),
'type' => 'title',
'description' => '',
),
'account_number' => array(
'title' => __( 'Numer klienta (SAP)', 'woocommerce-dhl' ),
'type' => 'text',
'default' => ''
),
'sender_name' => array(
'title' => __( 'Nazwa', 'woocommerce-dhl' ),
'type' => 'text',
'default' => '',
'custom_attributes' => array(
'required' => 'required'
)
),
'sender_street' => array(
'title' => __( 'Adres', 'woocommerce-dhl' ),
'type' => 'text',
'default' => '',
'custom_attributes' => array(
'required' => 'required'
)
),
'sender_house_number' => array(
'title' => __( 'Nr budynku', 'woocommerce-dhl' ),
'type' => 'text',
'default' => ''
),
'sender_apartment_number' => array(
'title' => __( 'Nr lokalu', 'woocommerce-dhl' ),
'type' => 'text',
'default' => ''
),
'sender_postal_code' => array(
'title' => __( 'Kod pocztowy', 'woocommerce-dhl' ),
'type' => 'text',
'default' => '',
'custom_attributes' => array(
'required' => 'required'
)
),
'sender_city' => array(
'title' => __( 'Miasto', 'woocommerce-dhl' ),
'type' => 'text',
'default' => ''
),
'sender_contact_person' => array(
'title' => __( 'Osoba kontaktowa', 'woocommerce-dhl' ),
'type' => 'text',
'default' => '',
'custom_attributes' => array(
'required' => 'required'
)
),
'sender_contact_phone' => array(
'title' => __( 'Telefon', 'woocommerce-dhl' ),
'type' => 'text',
'default' => '',
'custom_attributes' => array(
'required' => 'required'
)
),
'sender_contact_email' => array(
'title' => __( 'E-mail', 'woocommerce-dhl' ),
'type' => 'text',
'default' => get_option( 'admin_email' ),
'custom_attributes' => array(
'required' => 'required'
)
),
array(
'title' => __( 'Zaawansowane', 'woocommerce-dhl' ),
'type' => 'title',
'description' => ''
),
self::OPTION_LOGGING => [
'title' => __( 'Zapis zdarzeń', 'woocommerce-dpd' ),
'label' => __( 'Włącz zapis zdarzeń do logów', 'woocommerce-dpd' ),
'type' => 'checkbox',
// Translators: WC logger URL.
'description' => sprintf( __( 'Zapis zdarzeń należy włączać tylko podczas diagnozowania problemów. Zdarzenia zapisywane są w %1$sdzienniku WooCommerce%2$s.', 'woocommerce-dpd' ), '<a href="' . admin_url( 'admin.php?page=wc-status&tab=logs' ) . '" target="_blank">', '</a>' ),
'custom_attributes' => [],
'default' => 'no',
'desc_tip' => false,
],
'select_type' => array(
'title' => __( 'Wybór DHL Parcel', 'woocommerce-dhl' ),
'type' => 'select',
'default' => 'select2',
'description' => sprintf(__( 'Sprawdź opis listy punktów odbioru w naszej %sdokumentacji%s.', 'woocommerce-dhl' ), '<a href="https://www.wpdesk.pl/docs/woocommerce-dhl-docs/#Opcje_zaawansowane" target="_blank">', '</a>' ),
'options' => array(
'select2' => __( 'Select2', 'woocommerce-dhl' ),
'select2_ajax' => __( 'Select2 (AJAX)', 'woocommerce-dhl' ),
),
),
);
/*
if ( apply_filters( 'flexible_printing', false ) ) {
$settings[] = array(
'title' => __( 'Drukowanie', 'woocommerce-dhl' ),
'type' => 'title',
'description' => '',
);
$settings['auto_print'] = array(
'title' => __( 'Etykiety', 'woocommerce-dhl' ),
'label' => __( 'Włącz automatyczne drukowanie', 'woocommerce-dhl' ),
'type' => 'checkbox',
'description' => __( 'Etykieta zostanie automatycznie wydrukowana na wybranej drukarce', 'woocommerce-dhl' ),
'default' => 'no',
'desc_tip' => false
);
$settings['printer'] = array(
'title' => __( 'Drukarka', 'woocommerce-dhl' ),
'type' => 'select',
'options' => apply_filters( 'flexible_printing_printers', array() ),
'description' => __( 'Drukarka, na której zostanie wydrukowana etykieta', 'woocommerce-dhl' ),
'default' => 'no',
'desc_tip' => false
);
}
*/
return $settings;

View File

@@ -0,0 +1,19 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
?>
<div>
<?php if ( $one_time_message ) : ?>
<p class="dhl_error"><?php echo $one_time_message; ?></p>
<?php endif; ?>
<input name="post_id" type="hidden" value="<?php echo $post->ID; ?>" />
<?php /*
<p>
<a class="button dhl-button dhl-button-add"><?php _e( 'Dodaj przesyłkę', 'woocommerce-dhl' ); ?></a>
<span class="dhl-spinner spinner"></span>
</p>
*/ ?>
</div>
<?php /* ?>
<pre><?php print_r($package); ?></pre>
<?php /* */ ?>
<div style="clear:both;"></div>

View File

@@ -0,0 +1,104 @@
<div class="dhl_additional_package" id="dhl_additional_package_<?php echo $additional_key; ?>" data-key="<?php echo $additional_key; ?>" data-count="<?php echo $count; ?>">
<h4><?php echo $additional_package_label; ?></h4>
<?php
$key = 'dhl[' . $count . '][additional_packages][' . $additional_key . '][dhl_package_type]';
$args = array(
'label' => __( 'Typ', 'woocommerce-dhl' ),
'id' => 'dhl_' . $count . '_' . $additional_key . '_dhl_package_type',
'type' => 'select',
'options' => WPDesk_WooCommerce_DHL::get_package_types(),
'input_class' => array( 'dhl-package-type' ),
);
$value = '';
if ( isset( $additional_package['dhl_package_type'] ) ) {
$value = $additional_package['dhl_package_type'];
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
<div class="dhl-weight">
<?php
$key = 'dhl[' . $count . '][additional_packages][' . $additional_key . '][dhl_package_weight]';
$args = array(
'label' => __( 'Waga [kg]', 'woocommerce-dhl' ),
'id' => 'dhl_' . $count . '_' . $additional_key . '_dhl_package_weight',
'type' => 'number',
);
$value = '';
if ( isset( $additional_package['dhl_package_weight'] ) ) {
$value = $additional_package['dhl_package_weight'];
}
else {
$value = $settings['package_weight'];
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
</div>
<div class="dhl-dimensions">
<label><?php _e( 'Wymiary (dł / sz / wys) [cm]' ); ?></label>
<?php
$key = 'dhl[' . $count . '][additional_packages][' . $additional_key . '][dhl_package_width]';
$args = array(
'type' => 'number',
'id' => 'dhl_' . $count . '_' . $additional_key . '_dhl_package_width',
);
$value = '';
if ( isset( $additional_package['dhl_package_width'] ) ) {
$value = $additional_package['dhl_package_width'];
}
else {
$value = $settings['package_width'];
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
<?php
$key = 'dhl[' . $count . '][additional_packages][' . $additional_key . '][dhl_package_length]';
$args = array(
'label' => '/',
'type' => 'number',
'id' => 'dhl_' . $count . '_' . $additional_key . '_dhl_package_length',
);
$value = '';
if ( isset( $additional_package['dhl_package_length'] ) ) {
$value = $additional_package['dhl_package_length'];
}
else {
$value = $settings['package_length'];
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
<?php
$key = 'dhl[' . $count . '][additional_packages][' . $additional_key . '][dhl_package_height]';
$args = array(
'label' => '/',
'type' => 'number',
'id' => 'dhl_' . $count . '_' . $additional_key . '_dhl_package_height',
);
$value = '';
if ( isset( $additional_package['dhl_package_height'] ) ) {
$value = $additional_package['dhl_package_height'];
}
else {
$value = $settings['package_height'];
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
</div>
<a data-count="<?php echo $count; ?>" data-key="<?php echo $additional_key; ?>" class="dhl-button dhl-button-delete-package"><?php _e( 'Usuń', 'woocommerce-dhl' ); ?></a>
<div style="clear: both;"></div>
<hr/>
</div>

View File

@@ -0,0 +1,351 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
$disabled = false;
if ( isset( $package['dhl_status'] ) && $package['dhl_status'] == 'ok' ) {
$disabled = true;
}
?>
<div class="dhl-package">
<input id="dhl_<?php echo $count; ?>_key" name="dhl[<?php echo $count; ?>][key]" type="hidden" value="<?php echo $key; ?>" />
<input id="dhl_<?php echo $count; ?>_post_id" name="dhl[<?php echo $count; ?>][post_id]" type="hidden" value="<?php echo $post->ID; ?>" />
<?php if ( count( $_dhl ) > 1 ) : ?>
<h4><?php echo sprintf( __( 'Przesyłka %s', 'woocommerce-dhl' ), $count ); ?></h4>
<?php endif; ?>
<?php
$key = 'dhl[' . $count . '][dhl_product]';
$args = array(
'label' => __( 'Usługa DHL', 'woocommerce-dhl' ),
'id' => 'dhl_' . $count . '_dhl_product',
'type' => 'select',
'options' => WPDesk_WooCommerce_DHL::get_products(),
);
$value = '';
if ( isset( $package['dhl_product'] ) ) {
$value = $package['dhl_product'];
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
<hr/>
<div class="dhl_package_data">
<h4><?php echo sprintf( __( 'Paczka %s', 'woocommerce-dhl' ), 1 ); ?></h4>
<?php
$key = 'dhl[' . $count . '][dhl_package_type]';
$args = array(
'label' => __( 'Typ', 'woocommerce-dhl' ),
'id' => 'dhl_' . $count . '_dhl_package_type',
'type' => 'select',
'options' => WPDesk_WooCommerce_DHL::get_package_types(),
'input_class' => array( 'dhl-package-type' ),
);
$value = '';
if ( isset( $package['dhl_package_type'] ) ) {
$value = $package['dhl_package_type'];
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
<div class="dhl-weight">
<?php
$key = 'dhl[' . $count . '][dhl_package_weight]';
$args = array(
'label' => __( 'Waga [kg]', 'woocommerce-dhl' ),
'id' => 'dhl_' . $count . '_dhl_package_weight',
'type' => 'number',
);
$value = '';
if ( isset( $package['dhl_package_weight'] ) ) {
$value = $package['dhl_package_weight'];
}
else {
$value = $settings['package_weight'];
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
</div>
<div class="dhl-dimensions">
<label><?php _e( 'Wymiary (dł / sz / wys) [cm]' ); ?></label>
<?php
$key = 'dhl[' . $count . '][dhl_package_width]';
$args = array(
'type' => 'number',
'id' => 'dhl_' . $count . '_dhl_package_width',
);
$value = '';
if ( isset( $package['dhl_package_width'] ) ) {
$value = $package['dhl_package_width'];
}
else {
$value = $settings['package_width'];
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
<?php
$key = 'dhl[' . $count . '][dhl_package_length]';
$args = array(
'label' => '/',
'type' => 'number',
'id' => 'dhl_' . $count . '_dhl_package_length',
);
$value = '';
if ( isset( $package['dhl_package_length'] ) ) {
$value = $package['dhl_package_length'];
}
else {
$value = $settings['package_length'];
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
<?php
$key = 'dhl[' . $count . '][dhl_package_height]';
$args = array(
'label' => '/',
'type' => 'number',
'id' => 'dhl_' . $count . '_dhl_package_height',
);
$value = '';
if ( isset( $package['dhl_package_height'] ) ) {
$value = $package['dhl_package_height'];
}
else {
$value = $settings['package_height'];
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
</div>
</div>
<hr/>
<?php $count_additional = 1; ?>
<?php if ( isset( $package['additional_packages'] ) ) : ?>
<?php foreach ( $package['additional_packages'] as $additional_key => $additional_package ) : ?>
<?php $count_additional++; ?>
<?php $additional_package_label = sprintf( __( 'Paczka %s', 'woocommerce-dhl' ), $count_additional ); ?>
<?php include( 'dhl-metabox-additional-package.php' ); ?>
<?php endforeach; ?>
<?php endif; ?>
<?php if ( !$disabled ) : ?>
<p id="dhl_add_package_<?php echo $count; ?>">
<a data-count="<?php echo $count; ?>" data-count_additional="<?php echo $count_additional; ?>" class="button dhl-button dhl-button-add-package"><?php _e( 'Dodaj paczkę', 'woocommerce-dhl' ); ?></a>
<span class="dhl-spinner spinner"></span>
</p>
<hr/>
<div class="dhl_additional_package_template" id="dhl_additional_package_template_<?php echo $count; ?>" style="display: none;">
<?php $current_count = $count; ?>
<?php $count = '_count_'; ?>
<?php $additional_key = '_additional_key_'; ?>
<?php $count_additional = '_count_additional_'; ?>
<?php $additional_package = $package; ?>
<?php $additional_package_label = __( 'Nowa paczka', 'woocommerce-dhl' ); ?>
<?php include( 'dhl-metabox-additional-package.php' ); ?>
<?php $count = $current_count; ?>
</div>
<?php endif; ?>
<?php
$key = 'dhl[' . $count . '][dhl_shipment_date]';
$args = array(
'label' => __( 'Data wysyłki', 'woocommerce-dhl' ),
'id' => 'dhl_' . $count . '_dhl_shipment_date',
'type' => 'select',
'options' => $shipment_date_options,
);
$value = $shipment_date_default;
if ( isset( $package['dhl_shipment_date'] ) ) {
$value = $package['dhl_shipment_date'];
}
if ( isset( $package['dhl_status'] ) && $package['dhl_status'] == 'ok' ) {
$args['options'] = array( $package['dhl_shipment_date'] => $package['dhl_shipment_date'] );
$value = $package['dhl_shipment_date'];
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
<?php
$key = 'dhl[' . $count . '][dhl_insurance]';
$args = array(
'label' => __( 'Ubezpieczenie', 'woocommerce-dhl' ),
'id' => 'dhl_' . $count . '_dhl_insurance',
'type' => 'checkbox',
'input_class' => array( 'dhl-insurance' ),
);
$value = '0';
if ( isset( $package['dhl_insurance'] ) ) {
$value = $package['dhl_insurance'];
}
else {
$value = $settings['insurance'];
}
if ( $disabled ) {
$args['input_class'][] = 'dhl-disabled';
}
woocommerce_form_field( $key, $args, $value );
?>
<?php
$key = 'dhl[' . $count . '][dhl_insurance_value]';
$args = array(
'label' => __( 'Kwota ubezpieczenia', 'woocommerce-dhl' ),
'id' => 'dhl_' . $count . '_dhl_insurance_value',
'type' => 'number',
'class' => array( 'dhl-insurance-value' ),
'custom_attributes' => array(
'min' => 0,
'step' => '0.01',
)
);
$value = '';
if ( isset( $package['dhl_insurance_value'] ) ) {
$value = $package['dhl_insurance_value'];
}
else {
$value = $order->get_total();
}
if ( $disabled ) {
$args['custom_attributes']['disabled'] = 'disabled';
}
woocommerce_form_field( $key, $args, $value );
?>
<?php
$key = 'dhl[' . $count . '][dhl_cod]';
$args = array(
'label' => __( 'Pobranie', 'woocommerce-dhl' ),
'id' => 'dhl_' . $count . '_dhl_cod',
'type' => 'checkbox',
'input_class' => array( 'dhl-cod' ),
);
$value = '0';
if ( isset( $package['dhl_cod'] ) ) {
$value = $package['dhl_cod'];
}
if ( $disabled ) {
$args['input_class'][] = 'dhl-disabled';
}
woocommerce_form_field( $key, $args, $value );
?>
<?php
$key = 'dhl[' . $count . '][dhl_cod_value]';
$args = array(
'label' => __( 'Kwota pobrania', 'woocommerce-dhl' ),
'id' => 'dhl_' . $count . '_dhl_cod_value',
'type' => 'number',
'class' => array( 'dhl-cod-value' ),
'custom_attributes' => array(
'min' => 0,
'step' => '0.01',
)
);
$value = '';
if ( isset( $package['dhl_cod_value'] ) ) {
$value = $package['dhl_cod_value'];
}
else {
$value = $order->get_total();
}
if ( $disabled ) {
$args['custom_attributes']['disabled'] = 'disabled';
}
woocommerce_form_field( $key, $args, $value );
?>
<?php
$key = 'dhl[' . $count . '][dhl_content]';
$args = array(
'label' => __( 'Zawartość', 'woocommerce-dhl' ),
'id' => 'dhl_' . $count . '_dhl_content',
'type' => 'text',
);
$value = $settings['package_contents'];
if ( isset( $package['dhl_content'] ) ) {
$value = $package['dhl_content'];
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
<?php
$key = 'dhl[' . $count . '][dhl_comment]';
$args = array(
'label' => __( 'Komentarz', 'woocommerce-dhl' ),
'id' => 'dhl_' . $count . '_dhl_comment',
'type' => 'text',
);
$value = $settings['package_comment'];
if ( isset( $package['dhl_comment'] ) ) {
$value = $package['dhl_comment'];
}
else {
$value = str_replace( '[order_number]', $order->get_order_number(), $value );
$value = str_replace( '[shop_name]', get_bloginfo( 'name' ), $value );
$value = str_replace( '[shop_url]', home_url(), $value );
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
<?php if ( isset( $package['dhl_one_time_message'] ) && $package['dhl_one_time_message'] != '' ) : ?>
<p class="dhl_error">
<?php echo $package['dhl_one_time_message']; ?>
</p>
<?php endif; ?>
<?php if ( isset( $package['dhl_status'] ) && $package['dhl_status'] == 'error' ) : ?>
<p class="dhl_error">
<?php echo $package['dhl_message']; ?>
</p>
<?php endif; ?>
<?php if ( isset( $package['dhl_status'] ) && $package['dhl_status'] == 'ok' ) : ?>
<p>
<?php _e( 'Przesyłka: ', 'woocommerce-dhl' ); ?> <a target="_blank" href="<?php echo $this->get_tracking_url( $package['dhl_package_number'] ); ?>"><?php echo $package['dhl_package_number']; ?></a>
</p>
<p>
<a data-shipment-id="<?php echo $package['dhl_package']->createShipmentsResult->item->shipmentId; ?>" data-count="<?php echo $count; ?>" class="button button-primary dhl-button dhl-button-label"><?php _e( 'Pobierz etykietę', 'woocommerce-dhl' ); ?></a>
<span class="spinner dhl-spinner"></span>
<a data-count="<?php echo $count; ?>" class="dhl-button dhl-button-delete-created"><?php _e( 'Anuluj', 'woocommerce-dhl' ); ?></a>
</p>
<?php if ( apply_filters( 'flexible_printing', false ) && isset( $settings['flexible_printing_integration'] ) && $settings['flexible_printing_integration'] == 'yes' ) : ?>
<p>
<?php echo apply_filters( 'flexible_printing_print_button', '', 'dhl',
array(
'content' => 'print',
'id' => $package['dhl_package']->createShipmentsResult->item->shipmentId,
'icon' => true,
'label' => __( 'Drukuj na: %s', 'woocommerce-dhl' ),
'data' => array(
'post_id' => $post->ID,
'count' => $count,
'shipment_id' => $package['dhl_package']->createShipmentsResult->item->shipmentId,
),
)
); ?>
</p>
<?php endif; ?>
<?php endif; ?>
<?php if ( !isset( $package['dhl_status'] ) || $package['dhl_status'] == 'error' || $package['dhl_status'] == '' ) : ?>
<p>
<a data-count="<?php echo $count; ?>" class="button button-primary dhl-button dhl-button-create"><?php _e( 'Utwórz', 'woocommerce-dhl' ); ?></a>
<a data-count="<?php echo $count; ?>" class="button dhl-button dhl-button-save"><?php _e( 'Zapisz', 'woocommerce-dhl' ); ?></a>
<span class="spinner dhl-spinner"></span>
<?php /* ?>
<a data-count="<?php echo $count; ?>" class="dhl-button dhl-button-delete"><?php _e( 'Usuń', 'woocommerce-dhl' ); ?></a>
<?php /* */ ?>
</p>
<?php endif; ?>
</div>

View File

@@ -0,0 +1,123 @@
<div class="dhl_additional_package" id="dhl_additional_package_<?php echo $id; ?>" data-key="<?php echo $additional_key; ?>" data-id="<?php echo $id; ?>">
<h4><?php echo $additional_package_label; ?></h4>
<?php
$key = 'additional_packages[' . $additional_key . '][dhl_package_type]';
$args = array(
'label' => __( 'Typ', 'woocommerce-dhl' ),
'id' => 'dhl_package_type_' . $additional_key . '_' . $id,
'type' => 'select',
'options' => WPDesk_WooCommerce_DHL::get_package_types(),
'input_class' => array( 'dhl-package-type' ),
);
$value = '';
if ( isset( $additional_package['dhl_package_type'] ) ) {
$value = $additional_package['dhl_package_type'];
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
<?php
$key = 'additional_packages[' . $additional_key . '][dhl_package_nonstandard]';
$args = array(
'label' => __( 'Przesyłka niestandardowa (NST)', 'woocommerce-dhl' ),
'id' => 'dhl_package_nonstandard_' . $additional_key . '_' . $id,
'type' => 'checkbox',
'input_class' => array( 'dhl-package-nonstandard' ),
);
$value = isset( $additional_package['dhl_package_nonstandard'] ) ? $additional_package['dhl_package_nonstandard'] : ( isset( $settings['package_nonstandard'] ) && $settings['package_nonstandard'] === 'yes' ? 1 : 0 );
if ( $disabled ) {
$args['input_class'][] = 'dhl-disabled';
}
woocommerce_form_field( $key, $args, $value );
?>
<div class="dhl-weight">
<?php
$key = 'additional_packages[' . $additional_key . '][dhl_package_weight]';
$args = array(
'label' => __( 'Waga [kg]', 'woocommerce-dhl' ),
'id' => 'dhl_package_weight_' . $additional_key . '_' . $id,
'type' => 'number',
);
$value = '';
if ( isset( $additional_package['dhl_package_weight'] ) ) {
$value = $additional_package['dhl_package_weight'];
}
else {
$value = $settings['package_weight'];
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
</div>
<div class="dhl-dimensions">
<label><?php _e( 'Wymiary (dł / sz / wys) [cm]' ); ?></label>
<?php
$key = 'additional_packages[' . $additional_key . '][dhl_package_width]';
$args = array(
'type' => 'number',
'id' => 'dhl_package_width_' . $additional_key . '_' . $id,
);
$value = '';
if ( isset( $additional_package['dhl_package_width'] ) ) {
$value = $additional_package['dhl_package_width'];
}
else {
$value = $settings['package_width'];
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
<?php
$key = 'additional_packages[' . $additional_key . '][dhl_package_length]';
$args = array(
'label' => '/',
'type' => 'number',
'id' => 'dhl_package_length_' . $additional_key . '_' . $id,
);
$value = '';
if ( isset( $additional_package['dhl_package_length'] ) ) {
$value = $additional_package['dhl_package_length'];
}
else {
$value = $settings['package_length'];
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
<?php
$key = 'additional_packages[' . $additional_key . '][dhl_package_height]';
$args = array(
'label' => '/',
'type' => 'number',
'id' => 'dhl_package_height_' . $additional_key . '_' . $id,
);
$value = '';
if ( isset( $additional_package['dhl_package_height'] ) ) {
$value = $additional_package['dhl_package_height'];
}
else {
$value = $settings['package_height'];
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
</div>
<a data-id="<?php echo $id; ?>" data-key="<?php echo $additional_key; ?>" class="dhl-button dhl-button-delete-package"><?php _e( 'Usuń', 'woocommerce-dhl' ); ?></a>
<div style="clear: both;"></div>
<hr/>
</div>

View File

@@ -0,0 +1,483 @@
<?php if ( ! defined( 'ABSPATH' ) ) {
exit;
} /* Exit if accessed directly */ ?>
<div class="dhl-package">
<?php
$key = 'dhl_product';
$args = array(
'label' => __( 'Usługa DHL', 'woocommerce-dhl' ),
'id' => 'dhl_product_' . $id,
'type' => 'select',
'options' => WPDesk_WooCommerce_DHL::get_products(),
'input_class' => array( 'dhl-product' ),
);
$value = '';
if ( isset( $dhl_product ) ) {
$value = $dhl_product;
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
<?php
$security = wp_create_nonce( 'woocommerce-dhl' );
if ( $dhl_product == 'parcelshop' ) {
$service_points = array();
$service_points = $all_servicepoints;
if ( ! $valid_service_point ) {
foreach ( $user_selected_service_point as $key => $value ) {
$service_points[ $key ] = $value;
}
}
?>
<div class="dhl-parcelshop">
<hr/>
<?php
$key = 'dhl_parcelshop';
$args = array(
'label' => __( 'Punkt odbioru', 'woocommerce-dhl' ),
'id' => 'dhl_parcelshop_' . $id,
'type' => 'select',
'options' => $service_points,
'input_class' => array( 'dhl-parcelshop' ),
);
$value = '';
if ( isset( $dhl_parcelshop ) ) {
$value = $dhl_parcelshop;
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
</div>
<?php
}
?>
<hr/>
<div class="dhl_package_data">
<h4><?php echo sprintf( __( 'Paczka %s', 'woocommerce-dhl' ), 1 ); ?></h4>
<?php
$key = 'dhl_package_type';
$args = array(
'label' => __( 'Typ', 'woocommerce-dhl' ),
'id' => 'dhl_package_type_' . $id,
'type' => 'select',
'options' => WPDesk_WooCommerce_DHL::get_package_types(),
'input_class' => array( 'dhl-package-type' ),
);
$value = '';
if ( isset( $dhl_package_type ) ) {
$value = $dhl_package_type;
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
<?php
$key = 'dhl_package_nonstandard';
$args = array(
'label' => __( 'Przesyłka niestandardowa (NST)', 'woocommerce-dhl' ),
'id' => 'dhl_package_nonstandard_' . $id,
'type' => 'checkbox',
'input_class' => array( 'dhl-package-nonstandard' ),
);
$value = isset( $dhl_package_nonstandard ) ? $dhl_package_nonstandard : ( isset( $settings['package_nonstandard'] ) && $settings['package_nonstandard'] === 'yes' ? 1 : 0 );
if ( $disabled ) {
$args['input_class'][] = 'dhl-disabled';
}
woocommerce_form_field( $key, $args, $value );
?>
<div class="dhl-weight">
<?php
$key = 'dhl_package_weight';
$args = array(
'label' => __( 'Waga [kg]', 'woocommerce-dhl' ),
'id' => 'dhl_package_weight_' . $id,
'type' => 'number',
);
$value = '';
if ( isset( $dhl_package_weight ) ) {
$value = $dhl_package_weight;
} else {
$value = $settings['package_weight'];
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
</div>
<div class="dhl-dimensions">
<label><?php _e( 'Wymiary (dł / sz / wys) [cm]' ); ?></label>
<?php
$key = 'dhl_package_width';
$args = array(
'type' => 'number',
'id' => 'dhl_package_width_' . $id,
);
$value = '';
if ( isset( $dhl_package_width ) ) {
$value = $dhl_package_width;
} else {
$value = $settings['package_width'];
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
<?php
$key = 'dhl_package_length';
$args = array(
'label' => '/',
'type' => 'number',
'id' => 'dhl_package_length_' . $id,
);
$value = '';
if ( isset( $dhl_package_length ) ) {
$value = $dhl_package_length;
} else {
$value = $settings['package_length'];
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
<?php
$key = 'dhl_package_height';
$args = array(
'label' => '/',
'type' => 'number',
'id' => 'dhl_package_height_' . $id,
);
$value = '';
if ( isset( $dhl_package_height ) ) {
$value = $dhl_package_height;
} else {
$value = $settings['package_height'];
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
</div>
</div>
<hr/>
<?php $count_additional = 1; ?>
<?php if ( isset( $additional_packages ) ) : ?>
<?php foreach ( $additional_packages as $additional_key => $additional_package ) : ?>
<?php $count_additional ++; ?>
<?php $additional_package_label = sprintf( __( 'Paczka %s', 'woocommerce-dhl' ), $count_additional ); ?>
<?php include( 'order-metabox-additional-package.php' ); ?>
<?php endforeach; ?>
<?php endif; ?>
<?php if ( ! $disabled ) : ?>
<p id="dhl_add_package_<?php echo $id; ?>">
<a data-id="<?php echo $id; ?>" data-count_additional="<?php echo $count_additional; ?>"
class="button dhl-button dhl-button-add-package"><?php _e( 'Dodaj paczkę', 'woocommerce-dhl' ); ?></a>
<span class="dhl-spinner spinner shipping-spinner"></span>
</p>
<hr/>
<div class="dhl_additional_package_template" id="dhl_additional_package_template_<?php echo $id; ?>"
style="display: none;">
<?php $additional_key = '_additional_key_'; ?>
<?php $count_additional = '_count_additional_'; ?>
<?php $additional_package_label = __( 'Nowa paczka', 'woocommerce-dhl' ); ?>
<?php include( 'order-metabox-additional-package.php' ); ?>
</div>
<?php endif; ?>
<?php
$key = 'dhl_shipment_date';
$args = array(
'label' => __( 'Data wysyłki', 'woocommerce-dhl' ),
'id' => 'dhl_shipment_date_' . $id,
'type' => 'select',
'options' => $shipment_date_options,
);
$value = $shipment_date_default;
if ( isset( $dhl_shipment_date ) ) {
$value = $dhl_shipment_date;
}
if ( $disabled ) {
$args['options'] = array( $dhl_shipment_date => $dhl_shipment_date );
$value = $dhl_shipment_date;
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
<?php
$key = 'dhl_insurance';
$args = array(
'label' => __( 'Ubezpieczenie', 'woocommerce-dhl' ),
'id' => 'dhl_insurance_' . $id,
'type' => 'checkbox',
'input_class' => array( 'dhl-insurance' ),
);
$value = '0';
if ( isset( $dhl_insurance ) ) {
$value = $dhl_insurance;
} else {
$value = $settings['insurance'] ?? '0';
}
if ( $disabled ) {
$args['input_class'][] = 'dhl-disabled';
}
woocommerce_form_field( $key, $args, $value );
?>
<?php
$key = 'dhl_insurance_value';
$args = array(
'label' => __( 'Kwota ubezpieczenia', 'woocommerce-dhl' ),
'id' => 'dhl_insurance_value_' . $id,
'type' => 'number',
'class' => array( 'dhl-insurance-value' ),
'custom_attributes' => array(
'min' => 0,
'step' => '0.01',
)
);
$value = '';
if ( isset( $dhl_insurance_value ) ) {
$value = $dhl_insurance_value;
} else {
$value = $order->get_total();
}
if ( $disabled ) {
$args['custom_attributes']['disabled'] = 'disabled';
}
woocommerce_form_field( $key, $args, $value );
?>
<?php
$key = 'dhl_cod';
$args = array(
'label' => __( 'Pobranie', 'woocommerce-dhl' ),
'id' => 'dhl_cod_' . $id,
'type' => 'checkbox',
'input_class' => array( 'dhl-cod' ),
);
$value = '0';
if ( isset( $dhl_cod ) ) {
$value = $dhl_cod;
}
if ( $disabled ) {
$args['input_class'][] = 'dhl-disabled';
}
woocommerce_form_field( $key, $args, $value );
?>
<?php
$key = 'dhl_cod_value';
$args = array(
'label' => __( 'Kwota pobrania', 'woocommerce-dhl' ),
'id' => 'dhl_cod_value_' . $id,
'type' => 'number',
'class' => array( 'dhl-cod-value' ),
'custom_attributes' => array(
'min' => 0,
'step' => '0.01',
)
);
if ( 'PL' !== $order->get_shipping_country() ) {
$args['description'] = __( 'Uwaga! Dla przesyłek zagranicznych kwota pobrania jest wyrażona w lokalnej walucie odbiorcy przesyłki!', 'woocommerce-dhl' );
}
$value = '';
if ( isset( $dhl_cod_value ) ) {
$value = $dhl_cod_value;
}
if ( $disabled ) {
$args['custom_attributes']['disabled'] = 'disabled';
}
woocommerce_form_field( $key, $args, $value );
?>
<p class="form-row">
<label for="dhl_services_<?php echo $id; ?>">Usługi dodatkowe</label>
<span class="woocommerce-input-wrapper">
<select <?php disabled( $disabled, true ); ?> id="dhl_services_<?php echo $id; ?>" name="dhl_services" multiple
style="width: 100%;"
class="wc-enhanced-select dhl_services">
<?php foreach ( WPDesk_WooCommerce_DHL::get_services() as $service_id => $service_name ) : ?>
<option <?php selected( in_array( $service_id, $dhl_services ), true ); ?> value="<?php echo esc_attr( $service_id ); ?>"><?php echo $service_name; ?></option>
<?php endforeach; ?>
</select>
</span>
</p>
<?php
$key = 'dhl_content';
$args = array(
'label' => __( 'Zawartość', 'woocommerce-dhl' ),
'id' => 'dhl_content_' . $id,
'type' => 'text',
);
if ( isset( $dhl_content ) ) {
$value = $dhl_content;
} elseif ( isset( $settings ) && isset( $settings['package_contents'] ) ) {
$value = $settings['package_contents'];
} else {
$value = '';
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
<?php
$key = 'dhl_comment';
$args = array(
'label' => __( 'Komentarz', 'woocommerce-dhl' ),
'id' => 'dhl_comment_' . $id,
'type' => 'text',
);
if ( isset( $dhl_comment ) ) {
$value = $dhl_comment;
} else {
if ( isset( $settings ) && isset( $settings['package_comment'] ) ) {
$value = $settings['package_comment'];
$value = str_replace( '[order_number]', $order->get_order_number(), $value );
$value = str_replace( '[shop_name]', get_bloginfo( 'name' ), $value );
$value = str_replace( '[shop_url]', home_url(), $value );
} else {
$value = '';
}
}
if ( $disabled ) {
$args['custom_attributes'] = array( 'disabled' => 'disabled' );
}
woocommerce_form_field( $key, $args, $value );
?>
<?php /*
<?php if ( isset( $dhl_one_time_message ) && $dhl_one_time_message != '' ) : ?>
<p class="dhl_error">
<?php echo $dhl_one_time_message; ?>
</p>
<?php endif; ?>
<?php if ( isset( $dhl_status ) && $dhl_status == 'error' ) : ?>
<p class="dhl_error">
<?php echo $dhl_message; ?>
</p>
<?php endif; ?>
*/ ?>
<?php if ( isset( $dhl_status ) && $dhl_status == 'ok' ) : ?>
<p>
<?php _e( 'Przesyłka: ', 'woocommerce-dhl' ); ?> <a target="_blank"
href="<?php echo $tracking_url; ?>"><?php echo $dhl_package_number; ?></a>
</p>
<p>
<a target="_blank" href='<?php echo $label_url; ?>' data-id="<?php echo $id; ?>"
class="button button-primary dhl-button"><?php _e( 'Pobierz etykietę', 'woocommerce-dhl' ); ?></a>
<span class="spinner dhl-spinner shipping-spinner"></span>
<a data-id="<?php echo $id; ?>"
class="dhl-button dhl-button-delete-created button-shipping"><?php _e( 'Anuluj', 'woocommerce-dhl' ); ?></a>
</p>
<?php endif; ?>
<?php if ( $label_avaliable ) : ?>
<?php if ( apply_filters( 'flexible_printing', false ) ) : ?>
<p>
<?php echo apply_filters( 'flexible_printing_print_button', '', 'dhl',
array(
'content' => 'print',
'id' => $dhl_package_number,
'icon' => true,
'label' => __( 'Drukuj na: %s', 'woocommerce-dhl' ),
'data' => array(
'shippment_id' => $id,
'dhl_package_number' => $dhl_package_number,
),
)
); ?>
</p>
<?php endif; ?>
<?php endif; ?>
<?php if ( ! $disabled ) : ?>
<p>
<button data-id="<?php echo $id; ?>"
class="button button-primary dhl-button dhl-button-create button-shipping"><?php _e( 'Utwórz', 'woocommerce-dhl' ); ?></button>
<button data-id="<?php echo $id; ?>"
class="button dhl-button dhl-button-save button-shipping"><?php _e( 'Zapisz', 'woocommerce-dhl' ); ?></button>
<span class="spinner dhl-spinner shipping-spinner"></span>
</p>
<?php endif; ?>
</div>
<script type="text/javascript">
jQuery( document ).ready( function ( $ ) {
const {__} = wp.i18n;
function matchStart( params, data ) {
if ( $.trim( params.term ) === '' ) {
return data;
}
if ( typeof data.children === 'undefined' ) {
return null;
}
var term = $.trim( params.term ).replace( /,/g, "" ).split( " " );
var str_pattern = term.join( '.+' );
var regex = new RegExp( '(' + str_pattern + ')', "gi" );
var filteredChildren = [];
$.each( data.children, function ( idx, child ) {
if ( regex.test( child.text ) ) {
filteredChildren.push( child );
}
} );
if ( filteredChildren.length ) {
var modifiedData = $.extend( {}, data, true );
modifiedData.children = filteredChildren;
return modifiedData;
}
return null;
}
var _dhl_select = jQuery( '#dhl_parcelshop_<?php echo $id; ?>' );
var containerClass = 'dhl-parcelshop-select-container';
var options = {
containerCssClass: containerClass,
matcher: matchStart
};
options = {
containerCssClass: containerClass,
minimumInputLength: 3,
escapeMarkup: function ( markup ) {
return markup;
},
placeholder: __( 'Wpisz miasto lub miasto, ulica.', 'woocommerce-dhl' ), language: {
inputTooShort: function ( args ) {
var remainingChars = args.minimum - args.input.length;
var minimumChars = __( 'Wpisz minimum % znaki.', 'woocommerce-dhl' );
return minimumChars.replace( "%", remainingChars )
}, loadingMore: function () {
return __( 'Więcej...', 'woocommerce-dhl' )
}, noResults: function () {
return __( 'Brak punktów odbioru.', 'woocommerce-dhl' )
}, searching: function () {
return __( 'Szukam punktów odbioru...', 'woocommerce-dhl' )
}, errorLoading: function () {
return __( 'Wyszukiwanie w toku...', 'woocommerce-dhl' )
}
}
};
if ( $.fn.selectWoo ) {
_dhl_select.selectWoo( options );
} else if ( $.fn.select2 ) {
_dhl_select.select2( options );
}
dhl_init();
} )
</script>

View File

@@ -0,0 +1,406 @@
<?php
function dhl_plugin_activate() {
global $wpdb;
if ( get_option( 'dhl_convert_fs', '0' ) != '1' ) {
$sql = "insert into {$wpdb->postmeta} ( post_id, meta_key, meta_value )
( select post_id, '_flexible_shipping_integration', 'dhl'
from {$wpdb->postmeta} m
where m.meta_key = '_dhl'
and not exists ( select 1 from {$wpdb->postmeta} m2 where m.post_id = m2.post_id and m2.meta_key = '_flexible_shipping_integration' and m2.meta_value = 'dhl' ) )";
$wpdb->query( $sql );
$sql = "insert into {$wpdb->postmeta} ( post_id, meta_key, meta_value )
( select post_id, '_flexible_shipping_status', 'confirmed'
from {$wpdb->postmeta} m where m.meta_key = '_dhl' and m.meta_value like '%\"dhl_status\";s:2:\"ok\"%'
and not exists ( select 1 from {$wpdb->postmeta} m2 where m.post_id = m2.post_id and m2.meta_key = '_flexible_shipping_status' ) )";
$wpdb->query( $sql );
$sql = "insert into {$wpdb->postmeta} ( post_id, meta_key, meta_value )
( select post_id, '_flexible_shipping_status', 'failed'
from {$wpdb->postmeta} m where m.meta_key = '_dhl' and m.meta_value like '%\"dhl_status\";s:5:\"error\"%'
and not exists ( select 1 from {$wpdb->postmeta} m2 where m.post_id = m2.post_id and m2.meta_key = '_flexible_shipping_status' ) )";
$wpdb->query( $sql );
$sql = "insert into {$wpdb->postmeta} ( post_id, meta_key, meta_value )
( select post_id, '_flexible_shipping_status', 'new'
from {$wpdb->postmeta} m where m.meta_key = '_dhl'
and not exists ( select 1 from {$wpdb->postmeta} m2 where m.post_id = m2.post_id and m2.meta_key = '_flexible_shipping_status' ) )";
$wpdb->query( $sql );
update_option( 'dhl_convert_fs', '1' );
}
}
register_activation_hook( __FILE__, 'dhl_plugin_activate' );
if ( !function_exists( 'wpdesk_get_order_id' ) ) {
function wpdesk_get_order_id( $order ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
return $order->id;
} else {
return $order->get_id();
}
}
}
if ( !function_exists( 'wpdesk_get_order_item_meta_data' ) ) {
function wpdesk_get_order_item_meta_data( WC_Order $order, $item_id, $convert_to_array = false ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
return $order->has_meta( $item_id );
}
else {
if ( $convert_to_array ) {
$metas = $order->get_item( $item_id )->get_meta_data();
$ret = array();
foreach ( $metas as $meta ) {
$ret[] = array( 'id' => $meta->id, 'meta_id' => $meta->id, 'meta_key' => $meta->key, 'meta_value' => $meta->value );
}
return $ret;
}
else {
return $order->get_item( $item_id )->get_meta_data();
}
}
}
}
if ( !function_exists( 'wpdesk_get_order_meta' ) ) {
function wpdesk_get_order_meta( $order, $meta_key, $single = false ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
$load_order = false;
if ( in_array( $meta_key, array( 'order_date', 'customer_note' ) ) ) {
$load_order = true;
}
if ( is_numeric( $order ) && ! $load_order ) {
if ( $meta_key == '_currency' ) {
$meta_key = '_order_currency';
}
return get_post_meta( $order, $meta_key, $single );
} else {
switch ( $meta_key ) {
case 'order_date':
return $order->order_date;
case 'customer_note':
return $order->customer_note;
default:
return get_post_meta( $order->id, $meta_key, $single );
}
}
} else {
if ( is_numeric( $order ) ) {
$order = wc_get_order( $order );
}
switch ( $meta_key ) {
case '_parent_id':
return $order->get_parent_id();
break;
case '_status':
return $order->get_status();
break;
case '_order_currency':
case '_currency':
return $order->get_currency();
break;
case '_version':
return $order->get_version();
break;
case '_prices_include_tax':
return $order->get_prices_include_tax();
break;
case '_date_created':
return date( "Y-m-d H:i:s", get_date_created()->getTimestamp() );
break;
case '_date_modified':
return date( "Y-m-d H:i:s", $order->get_date_modified()->getTimestamp() );
break;
case '_discount_total':
return $order->get_discount_total();
break;
case '_discount_tax':
return $order->get_discount_tax();
break;
case '_shipping_total':
return $order->get_shipping_total();
break;
case '_shipping_tax':
return $order->get_shipping_tax();
break;
case '_cart_tax':
return $order->get_cart_tax();
break;
case '_total':
return $order->get_total();
break;
case '_total_tax':
return $order->get_total_tax();
break;
case '_customer_id':
return $order->get_customer_id();
break;
case '_order_key':
return $order->get_order_key();
break;
case '_billing_first_name':
return $order->get_billing_first_name();
break;
case '_billing_last_name':
return $order->get_billing_last_name();
break;
case '_billing_company':
return $order->get_billing_company();
break;
case '_billing_address_1':
return $order->get_billing_address_1();
break;
case '_billing_address_2':
return $order->get_billing_address_2();
break;
case '_billing_city':
return $order->get_billing_city();
break;
case '_billing_state':
return $order->get_billing_state();
break;
case '_billing_postcode':
return $order->get_billing_postcode();
break;
case '_billing_country':
return $order->get_billing_country();
break;
case '_billing_email':
return $order->get_billing_email();
break;
case '_billing_phone':
return $order->get_billing_phone();
break;
case '_shipping_first_name':
return $order->get_shipping_first_name();
break;
case '_shipping_last_name':
return $order->get_shipping_last_name();
break;
case '_shipping_company':
return $order->get_shipping_company();
break;
case '_shipping_address_1':
return $order->get_shipping_address_1();
break;
case '_shipping_address_2':
return $order->get_shipping_address_2();
break;
case '_shipping_city':
return $order->get_shipping_city();
break;
case '_shipping_state':
return $order->get_shipping_state();
break;
case '_shipping_postcode':
return $order->get_shipping_postcode();
break;
case '_shipping_country':
return $order->get_shipping_country();
break;
case '_payment_method':
return $order->get_payment_method();
break;
case '_payment_method_title':
return $order->get_payment_method_title();
break;
case '_transaction_id':
return $order->get_transaction_id();
break;
case '_customer_ip_address':
return $order->get_customer_ip_address();
break;
case '_customer_user_agent':
return $order->get_customer_user_agent();
break;
case '_created_via':
return $order->get_created_via();
break;
case '_customer_note':
return $order->get_customer_note();
break;
case '_completed_date':
case '_date_completed':
$date_completed = $order->get_date_completed();
if ( isset( $date_completed ) ) {
return date( "Y-m-d H:i:s", $date_completed->getTimestamp() );
}
return null;
break;
case '_date_paid':
return $order->get_date_paid();
break;
case '_cart_hash':
return $order->get_cart_hash();
break;
case 'order_date':
return date( "Y-m-d H:i:s", $order->get_date_created()->getTimestamp() );
break;
default:
$ret = $order->get_meta( $meta_key, $single );
return $ret;
}
}
}
}
if ( !function_exists( 'wpdesk_update_order_meta' ) ) {
function wpdesk_update_order_meta( $order, $meta_key, $meta_value ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
if ( is_numeric( $order ) ) {
$order_id = $order;
}
else {
$order_id = $order->id;
}
update_post_meta( $order_id, $meta_key, $meta_value );
}
else {
if ( is_numeric( $order ) ) {
$order_id = $order;
$order = wc_get_order( $order_id );
}
$order->update_meta_data( $meta_key, $meta_value );
$order->save();
}
}
}
if ( !function_exists( 'wpdesk_get_product_id' ) ) {
function wpdesk_get_product_id( WC_Product $product ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
return $product->id;
} else {
return $product->get_id();
}
}
}
if ( !function_exists( 'wpdesk_get_product_variation_id' ) ) {
function wpdesk_get_product_variation_id( WC_Product_Variation $product ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
return $product->variation_id;
} else {
return $product->get_id();
}
}
}
if ( !function_exists( 'wpdesk_get_variation_id' ) ) {
function wpdesk_get_variation_id( WC_Product_Variation $product ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
return $product->variation_id;
} else {
return $product->get_id();
}
}
}
if ( !function_exists( 'wpdesk_get_variation_parent_id' ) ) {
function wpdesk_get_variation_parent_id( WC_Product_Variation $product ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
return $product->id;
} else {
return $product->get_parent_id();
}
}
}
if ( !function_exists( 'wpdesk_get_price_including_tax' ) ) {
function wpdesk_get_price_including_tax( WC_Product $product, $qty = 1, $price = '' ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
return $product->get_price_including_tax( $qty, $price );
}
else {
$args = array( 'qty' => $qty, 'price' => $price );
return wc_get_price_including_tax( $product, $args );
}
}
}
if ( !function_exists( 'wpdesk_get_price_excluding_tax' ) ) {
function wpdesk_get_price_excluding_tax( WC_Product $product, $qty = 1, $price = '' ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
return $product->get_price_excluding_tax( $qty, $price );
}
else {
$args = array( 'qty' => $qty, 'price' => $price );
return wc_get_price_excluding_tax( $product, $args );
}
}
}
if ( !function_exists( 'wpdesk_reduce_stock_levels' ) ) {
function wpdesk_reduce_stock_levels( WC_Order $order ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
return $order->reduce_order_stock();
} else {
wc_reduce_stock_levels( $order->get_id() );
}
}
}
if ( !function_exists( 'wpdesk_get_product_meta' ) ) {
function wpdesk_get_product_meta( $product, $meta_key, $single = false ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
if ( is_numeric( $product ) ) {
return get_post_meta( $product, $meta_key, $single );
} else {
return get_post_meta( $product->id, $meta_key, $single );
}
} else {
if ( is_numeric( $product ) ) {
$product = wc_get_product( $product );
}
switch ( $meta_key ) {
case '_stock_status' :
return $product->get_stock_status();
default:
break;
}
return $product->get_meta( $meta_key, $single );
}
}
}
if ( !function_exists( 'wpdesk_update_product_meta' ) ) {
function wpdesk_update_product_meta( $product, $meta_key, $meta_value ) {
$product_id = false;
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
if ( is_numeric( $product ) ) {
$product_id = $product;
}
else {
$product_id = $product->id;
}
update_post_meta( $product_id, $meta_key, $meta_value );
}
else {
if ( is_numeric( $product ) ) {
$product_id = $product;
$product = wc_get_product( $product_id );
}
$product->update_meta_data( $meta_key, $meta_value );
$product->save();
}
}
}
if ( !function_exists( 'wpdesk_get_product_post' ) ) {
function wpdesk_get_product_post( WC_Product $product ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
return $product->get_post_data();
}
else {
return get_post( $product->get_id() );
}
}
}

View File

@@ -0,0 +1,870 @@
msgid ""
msgstr ""
"Project-Id-Version: WooCommerce DHL\n"
"POT-Creation-Date: 2021-10-04 09:54+0200\n"
"PO-Revision-Date: 2021-10-04 09:54+0200\n"
"Last-Translator: Maciej Swoboda <maciej.swoboda@gmail.com>\n"
"Language-Team: Maciej Swoboda <support@wpdesk.pl>\n"
"Language: pl_PL\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.0\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-WPHeader: woocommerce-dhl.php\n"
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2);\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPathExcluded-0: *.js\n"
"X-Poedit-SearchPathExcluded-1: vendor\n"
"X-Poedit-SearchPathExcluded-2: vendor_prefixed\n"
#: classes/class-flexible-printing-integration.php:70
#, php-format
msgid "Blad drukowania: %s"
msgstr ""
#: classes/class-flexible-printing-integration.php:129
#: classes/class-flexible-printing-integration.php:148
#: classes/views/dhl-metabox-package.php:330
#: classes/views/order-metabox-content.php:391
#, php-format
msgid "Drukuj na: %s"
msgstr ""
#: classes/class-flexible-shipping-hooks.php:82
#: classes/class-woocommerce-dhl.php:1061
msgid "Status zmieniony automatycznie po utworzeniu przesyłki - wtyczka DHL."
msgstr ""
#: classes/class-flexible-shipping-hooks.php:94
#: classes/class-flexible-shipping-shipment.php:364
#: classes/class-shipping-method.php:22 classes/class-shipping-method.php:26
#: classes/class-woocommerce-dhl.php:411
msgid "DHL"
msgstr ""
#: classes/class-flexible-shipping-hooks.php:126
#: classes/views/dhl-metabox-package.php:18
#: classes/views/order-metabox-content.php:8
msgid "Usługa DHL"
msgstr ""
#: classes/class-flexible-shipping-hooks.php:132
msgid "Rodzaj przesyłki"
msgstr ""
#: classes/class-flexible-shipping-hooks.php:138
msgid "Przesyłka niestandardowa"
msgstr ""
#: classes/class-flexible-shipping-hooks.php:139
#: classes/views/order-metabox-additional-package.php:26
#: classes/views/order-metabox-content.php:84
msgid "Przesyłka niestandardowa (NST)"
msgstr ""
#: classes/class-flexible-shipping-hooks.php:142
msgid ""
"Zaznacz tą opcję jeżeli wysyłane przez Ciebie produkty lub ich opakowania "
"kwalifikują się na przesyłkę niestandardową."
msgstr ""
#: classes/class-flexible-shipping-hooks.php:146
#: classes/views/dhl-metabox-package.php:185
#: classes/views/order-metabox-content.php:223
msgid "Ubezpieczenie"
msgstr ""
#: classes/class-flexible-shipping-hooks.php:151
#: classes/views/dhl-metabox-package.php:229
#: classes/views/order-metabox-content.php:265
msgid "Pobranie"
msgstr ""
#: classes/class-flexible-shipping-hooks.php:156
msgid "Usługi dodatkowe"
msgstr ""
#: classes/class-flexible-shipping-hooks.php:161
msgid "Wybierz dostępne opcje dodatkowe dla wskazanej usługi DHL."
msgstr ""
#: classes/class-flexible-shipping-hooks.php:163
#, php-format
msgid ""
"Niektóre usługi dodatkowe mogą być dostępne jedynie dla wybranych kodów "
"pocztowych. %sDowiedz się więcej o usługach dodatkowych DHL &rarr;%s"
msgstr ""
#: classes/class-flexible-shipping-hooks.php:268
msgid "Brak"
msgstr ""
#: classes/class-flexible-shipping-hooks.php:391
#: classes/class-flexible-shipping-shipment.php:376
msgid "Przesyłka została utworzona."
msgstr ""
#: classes/class-flexible-shipping-hooks.php:420
msgid "Etykieta została pobrana."
msgstr ""
#: classes/class-flexible-shipping-hooks.php:431
#: classes/class-woocommerce-dhl.php:383
msgid "Przesyłka nie została odnaleziona (1)."
msgstr ""
#: classes/class-flexible-shipping-shipment.php:214
#: templates/woocommerce/shipping-method-after.php:19
msgid "Wybierz punkt odbioru"
msgstr ""
#: classes/class-flexible-shipping-shipment.php:372
msgid "Przesyłka została zapisana."
msgstr ""
#: classes/class-flexible-shipping-shipment.php:381
msgid "Przesyłka została anulowana."
msgstr ""
#: classes/class-flexible-shipping-shipment.php:385
msgid "Nieznana akcja: \""
msgstr ""
#: classes/class-flexible-shipping-shipment.php:524
#, php-format
msgid "Do zamówienia została utworzona przesyłka %s DHL."
msgstr ""
#: classes/class-flexible-shipping-shipment.php:529
#: classes/class-flexible-shipping-shipment.php:584
#, php-format
msgid "Invalid status: %s. Package already created?"
msgstr ""
#: classes/class-flexible-shipping-shipment.php:672
#, php-format
msgid ""
"Niepoprawny status przesyłki: %s. Przesyłka została anulaowana wcześniej lub "
"protokół został już utworzony?"
msgstr ""
#: classes/class-flexible-shipping-shipment.php:687
#, php-format
msgid "Przesyłka DHL %s została usunięta."
msgstr ""
#: classes/class-flexible-shipping-shipment.php:833
msgid "Adres wysyłki powinien zawierać numer domu."
msgstr ""
#: classes/class-flexible-shipping-shipment.php:934
#, php-format
msgid "Etykieta niedostępna dla statusu %s."
msgstr ""
#: classes/class-shipping-method.php:23
msgid ""
"Integracja WooCommerce z DHL. <a href=\"https://www.wpdesk.pl/docs/"
"woocommerce-dhl-docs/\" target=\"_blank\">Zapoznaj się z instrukcją obsługi "
"&rarr;</a>"
msgstr ""
#: classes/class-shipping-method.php:128
#, php-format
msgid "Komunikat API DHL: %s - %s"
msgstr ""
#: classes/class-shipping-method.php:139
#, php-format
msgid "Komunikat DHL Parcelshop API: %s - %s"
msgstr ""
#: classes/class-woocommerce-dhl-plugin.php:165
msgid "Wskazany punkt odbioru nie istnieje!"
msgstr ""
#: classes/class-woocommerce-dhl-plugin.php:168
msgid "Więcej..."
msgstr ""
#: classes/class-woocommerce-dhl-plugin.php:169
msgid "Brak punktów."
msgstr ""
#: classes/class-woocommerce-dhl-plugin.php:170
msgid "Szukam punktów..."
msgstr ""
#: classes/class-woocommerce-dhl-plugin.php:171
msgid "Wyszukiwanie w toku..."
msgstr ""
#: classes/class-woocommerce-dhl-plugin.php:172
msgid "Wpisz miasto lub miasto, ulica."
msgstr ""
#: classes/class-woocommerce-dhl-plugin.php:173
msgid "Wpisz minimum % znaki."
msgstr ""
#: classes/class-woocommerce-dhl-plugin.php:174
msgid "Punkt nie istnieje"
msgstr ""
#: classes/class-woocommerce-dhl-plugin.php:220
msgid ""
"Wtyczka WooCommerce DHL wymaga wtyczki Flexible Shipping w wersji nie "
"niższej niż 1.9.4."
msgstr ""
#: classes/class-woocommerce-dhl-plugin.php:237
#, php-format
msgid ""
"Wtyczka WooCommerce DHL wymaga wtyczki Flexible Shipping. <a href=\"%s"
"\">Zainstaluj Flexible Shipping →</a>"
msgstr ""
#: classes/class-woocommerce-dhl-plugin.php:252
#, php-format
msgid ""
"Wtyczka WooCommerce DHL wymaga wtyczki Flexible Shipping. <a href=\"%s"
"\">Włącz Flexible Shipping →</a>"
msgstr ""
#: classes/class-woocommerce-dhl-plugin.php:272
msgid "Ustawienia"
msgstr ""
#: classes/class-woocommerce-dhl-plugin.php:273
msgid "Dokumentacja"
msgstr ""
#: classes/class-woocommerce-dhl-plugin.php:274
msgid "Wsparcie"
msgstr ""
#: classes/class-woocommerce-dhl.php:31
msgid "DHL Parcel Premium"
msgstr ""
#: classes/class-woocommerce-dhl.php:32
msgid "Przesyłka krajowa"
msgstr ""
#: classes/class-woocommerce-dhl.php:33
msgid "DHL Domestic Express 9"
msgstr ""
#: classes/class-woocommerce-dhl.php:34
msgid "DHL Domestic Express 12"
msgstr ""
#: classes/class-woocommerce-dhl.php:35
msgid "Przesyłka 2Europe"
msgstr ""
#: classes/class-woocommerce-dhl.php:43
msgid "Parcelshop"
msgstr ""
#: classes/class-woocommerce-dhl.php:51
msgid "Koperta"
msgstr ""
#: classes/class-woocommerce-dhl.php:52
msgid "Paczka"
msgstr ""
#: classes/class-woocommerce-dhl.php:53
msgid "Paleta"
msgstr ""
#: classes/class-woocommerce-dhl.php:62
msgid "Informacja przed doręczeniem (PDI)"
msgstr ""
#: classes/class-woocommerce-dhl.php:63
msgid "Doręczenie w sobotę"
msgstr ""
#: classes/class-woocommerce-dhl.php:185 classes/class-woocommerce-dhl.php:358
#, php-format
msgid "Do zamówienia została utworzona przesyłka %s. Szczegóły poniżej."
msgstr ""
#: classes/class-woocommerce-dhl.php:265 classes/class-woocommerce-dhl.php:276
msgid "Usunięcie przesyłki: przesyłka nie została odnaleziona."
msgstr ""
#: classes/class-woocommerce-dhl.php:271
msgid "Przesyłka została usunięta."
msgstr ""
#: classes/class-woocommerce-dhl.php:284
msgid "Paczka została usunięta."
msgstr ""
#: classes/class-woocommerce-dhl.php:304
#, php-format
msgid "Przesyłka %s została anulowana"
msgstr ""
#: classes/class-woocommerce-dhl.php:386
msgid "Przesyłka nie została odnaleziona (2)."
msgstr ""
#: classes/class-woocommerce-dhl.php:926
msgid "Poniedziałek: "
msgstr ""
#: classes/class-woocommerce-dhl.php:931
msgid "Wtorek: "
msgstr ""
#: classes/class-woocommerce-dhl.php:936
msgid "Środa: "
msgstr ""
#: classes/class-woocommerce-dhl.php:941
msgid "Czwartek: "
msgstr ""
#: classes/class-woocommerce-dhl.php:946
msgid "Piątek: "
msgstr ""
#: classes/class-woocommerce-dhl.php:951
msgid "Sobota: "
msgstr ""
#: classes/class-woocommerce-dhl.php:956
msgid "Niedziela: "
msgstr ""
#: classes/class-woocommerce-dhl.php:961
msgid "Tak"
msgstr ""
#: classes/class-woocommerce-dhl.php:963
msgid "Nie"
msgstr ""
#: classes/settings-dhl.php:28
#, php-format
msgid "Aby przejść do ustawień wydruku kliknij %stutaj%s."
msgstr ""
#: classes/settings-dhl.php:31
msgid "Konfiguracja wydruku dostępna po włączeniu opcji i zapisaniu ustawień."
msgstr ""
#: classes/settings-dhl.php:38
#, php-format
msgid ""
"Drukuj etykiety bezpośrnio na drukarce (bez pobierania pliku) lub zapisuj "
"automatycznie na dysku. %sKup Flexible Printing &rarr;%s."
msgstr ""
#: classes/settings-dhl.php:47
msgid "Logowanie DHL 24 API"
msgstr ""
#: classes/settings-dhl.php:52 classes/settings-dhl.php:78
msgid "Login"
msgstr ""
#: classes/settings-dhl.php:54
msgid "Login do DHL24 API."
msgstr ""
#: classes/settings-dhl.php:62 classes/settings-dhl.php:85
msgid "Hasło"
msgstr ""
#: classes/settings-dhl.php:64
msgid "Hasło do DHL24 API."
msgstr ""
#: classes/settings-dhl.php:73
msgid "Logowanie DHL Parcel Shop API"
msgstr ""
#: classes/settings-dhl.php:80
msgid "Login do DHL Parcelshop API."
msgstr ""
#: classes/settings-dhl.php:87
msgid "Hasło do DHL Parcelshop API."
msgstr ""
#: classes/settings-dhl.php:92 classes/settings-dhl.php:97
msgid "Tryb testowy"
msgstr ""
#: classes/settings-dhl.php:98
msgid "Włącz tryb testowy"
msgstr ""
#: classes/settings-dhl.php:100
msgid ""
"Jeśli włączasz tryb testowy - wpisz Login i Hasło API do serwisu testowego, "
"a nie do produkcyjnego. Serwis testowy dostępny jest pod adresem: <a target="
"\"_blank\" href=\"https://sandbox.dhl24.com.pl/\">https://sandbox.dhl24.com."
"pl/</a>"
msgstr ""
#: classes/settings-dhl.php:105
msgid "Deklaracja stałego zbioru"
msgstr ""
#: classes/settings-dhl.php:110
msgid "Stały zbiór"
msgstr ""
#: classes/settings-dhl.php:111
msgid "Włącz"
msgstr ""
#: classes/settings-dhl.php:113
msgid "Włącz tylko w przypadku, gdy masz podpisaną deklarację stałego zbioru."
msgstr ""
#: classes/settings-dhl.php:118
msgid ""
"Godzina, po której nastąpi zmiana daty nadania na następny dzień roboczy"
msgstr ""
#: classes/settings-dhl.php:122
msgid "0"
msgstr ""
#: classes/settings-dhl.php:123
msgid "1"
msgstr ""
#: classes/settings-dhl.php:124
msgid "2"
msgstr ""
#: classes/settings-dhl.php:125
msgid "3"
msgstr ""
#: classes/settings-dhl.php:126
msgid "4"
msgstr ""
#: classes/settings-dhl.php:127
msgid "5"
msgstr ""
#: classes/settings-dhl.php:128
msgid "6"
msgstr ""
#: classes/settings-dhl.php:129
msgid "7"
msgstr ""
#: classes/settings-dhl.php:130
msgid "8"
msgstr ""
#: classes/settings-dhl.php:131
msgid "9"
msgstr ""
#: classes/settings-dhl.php:132
msgid "10"
msgstr ""
#: classes/settings-dhl.php:133
msgid "11"
msgstr ""
#: classes/settings-dhl.php:134
msgid "12"
msgstr ""
#: classes/settings-dhl.php:135
msgid "13"
msgstr ""
#: classes/settings-dhl.php:136
msgid "14"
msgstr ""
#: classes/settings-dhl.php:137
msgid "15"
msgstr ""
#: classes/settings-dhl.php:138
msgid "16"
msgstr ""
#: classes/settings-dhl.php:139
msgid "17"
msgstr ""
#: classes/settings-dhl.php:140
msgid "18"
msgstr ""
#: classes/settings-dhl.php:141
msgid "19"
msgstr ""
#: classes/settings-dhl.php:142
msgid "20"
msgstr ""
#: classes/settings-dhl.php:143
msgid "21"
msgstr ""
#: classes/settings-dhl.php:144
msgid "22"
msgstr ""
#: classes/settings-dhl.php:145
msgid "23"
msgstr ""
#: classes/settings-dhl.php:149 classes/settings-dhl.php:154
msgid "Tworzenie przesyłek"
msgstr ""
#: classes/settings-dhl.php:158
msgid "Ręczne"
msgstr ""
#: classes/settings-dhl.php:159
msgid "Automatyczne"
msgstr ""
#: classes/settings-dhl.php:163
msgid "Status zamówienia"
msgstr ""
#: classes/settings-dhl.php:167
msgid ""
"Status zamówienia, przy którym do zamówienia zostanie automatycznie "
"utworzona przesyłka."
msgstr ""
#: classes/settings-dhl.php:171
msgid "Zrealizuj zamówienie"
msgstr ""
#: classes/settings-dhl.php:173
msgid "Włącz zmianę statusu zamówienia na Zrealizowane"
msgstr ""
#: classes/settings-dhl.php:175
msgid ""
"Po nadaniu przesyłek status zamówienia zostanie automatycznie zmieniony na "
"Zrealizowane."
msgstr ""
#: classes/settings-dhl.php:179
msgid "Domyślne ustawienia przesyłki"
msgstr ""
#: classes/settings-dhl.php:184
msgid "Długość paczki [cm]"
msgstr ""
#: classes/settings-dhl.php:195
msgid "Szerokość paczki [cm]"
msgstr ""
#: classes/settings-dhl.php:206
msgid "Wysokość paczki [cm]"
msgstr ""
#: classes/settings-dhl.php:217
msgid "Waga paczki"
msgstr ""
#: classes/settings-dhl.php:228
msgid "Zawartość paczki"
msgstr ""
#: classes/settings-dhl.php:233 classes/views/dhl-metabox-package.php:286
#: classes/views/order-metabox-content.php:336
msgid "Komentarz"
msgstr ""
#: classes/settings-dhl.php:235
msgid ""
"Komentarz widoczny na etykiecie. Dostępne shortcody [order_number], "
"[shop_name], [shop_url]"
msgstr ""
#: classes/settings-dhl.php:236
msgid "Zamówienie [order_number], [shop_name], [shop_url]"
msgstr ""
#: classes/settings-dhl.php:240
msgid "Etykiety"
msgstr ""
#: classes/settings-dhl.php:245
msgid "Format etykiet"
msgstr ""
#: classes/settings-dhl.php:248
msgid "Etykieta BLP"
msgstr ""
#: classes/settings-dhl.php:249
msgid "Etykieta BLP w formacie PDF A4"
msgstr ""
#: classes/settings-dhl.php:250
msgid "Etykieta BLP w formacie dla drukarek Zebra"
msgstr ""
#: classes/settings-dhl.php:255
msgid "Drukowanie"
msgstr ""
#: classes/settings-dhl.php:256
msgid "Włącz automatyczne drukowanie"
msgstr ""
#: classes/settings-dhl.php:264
msgid "Dane nadawcy"
msgstr ""
#: classes/settings-dhl.php:269
msgid "Numer klienta (SAP)"
msgstr ""
#: classes/settings-dhl.php:274
msgid "Nazwa"
msgstr ""
#: classes/settings-dhl.php:282
msgid "Adres"
msgstr ""
#: classes/settings-dhl.php:290
msgid "Nr budynku"
msgstr ""
#: classes/settings-dhl.php:295
msgid "Nr lokalu"
msgstr ""
#: classes/settings-dhl.php:300
msgid "Kod pocztowy"
msgstr ""
#: classes/settings-dhl.php:308
msgid "Miasto"
msgstr ""
#: classes/settings-dhl.php:313
msgid "Osoba kontaktowa"
msgstr ""
#: classes/settings-dhl.php:321
msgid "Telefon"
msgstr ""
#: classes/settings-dhl.php:329
msgid "E-mail"
msgstr ""
#: classes/settings-dhl.php:337
msgid "Zaawansowane"
msgstr ""
#: classes/settings-dhl.php:342
msgid "Wybór DHL Parcel"
msgstr ""
#: classes/settings-dhl.php:345
#, php-format
msgid "Sprawdź opis listy punktów odbioru w naszej %sdokumentacji%s."
msgstr ""
#: classes/settings-dhl.php:347
msgid "Select2"
msgstr ""
#: classes/settings-dhl.php:348
msgid "Select2 (AJAX)"
msgstr ""
#: classes/views/dhl-metabox-additional-package.php:6
#: classes/views/dhl-metabox-package.php:39
#: classes/views/order-metabox-additional-package.php:6
#: classes/views/order-metabox-content.php:65
msgid "Typ"
msgstr ""
#: classes/views/dhl-metabox-additional-package.php:25
#: classes/views/dhl-metabox-package.php:58
#: classes/views/order-metabox-additional-package.php:44
#: classes/views/order-metabox-content.php:101
msgid "Waga [kg]"
msgstr ""
#: classes/views/dhl-metabox-additional-package.php:43
#: classes/views/dhl-metabox-package.php:76
#: classes/views/order-metabox-additional-package.php:62
#: classes/views/order-metabox-content.php:118
msgid "Wymiary (dł / sz / wys) [cm]"
msgstr ""
#: classes/views/dhl-metabox-additional-package.php:101
#: classes/views/order-metabox-additional-package.php:120
msgid "Usuń"
msgstr ""
#: classes/views/dhl-metabox-package.php:13
#, php-format
msgid "Przesyłka %s"
msgstr ""
#: classes/views/dhl-metabox-package.php:35
#: classes/views/dhl-metabox-package.php:140
#: classes/views/order-metabox-content.php:61
#: classes/views/order-metabox-content.php:179
#, php-format
msgid "Paczka %s"
msgstr ""
#: classes/views/dhl-metabox-package.php:146
#: classes/views/order-metabox-content.php:186
msgid "Dodaj paczkę"
msgstr ""
#: classes/views/dhl-metabox-package.php:156
#: classes/views/order-metabox-content.php:194
msgid "Nowa paczka"
msgstr ""
#: classes/views/dhl-metabox-package.php:164
#: classes/views/order-metabox-content.php:201
msgid "Data wysyłki"
msgstr ""
#: classes/views/dhl-metabox-package.php:205
#: classes/views/order-metabox-content.php:242
msgid "Kwota ubezpieczenia"
msgstr ""
#: classes/views/dhl-metabox-package.php:246
#: classes/views/order-metabox-content.php:282
msgid "Kwota pobrania"
msgstr ""
#: classes/views/dhl-metabox-package.php:270
#: classes/views/order-metabox-content.php:317
msgid "Zawartość"
msgstr ""
#: classes/views/dhl-metabox-package.php:316
#: classes/views/order-metabox-content.php:372
msgid "Przesyłka: "
msgstr ""
#: classes/views/dhl-metabox-package.php:319
#: classes/views/order-metabox-content.php:377
msgid "Pobierz etykietę"
msgstr ""
#: classes/views/dhl-metabox-package.php:321
#: classes/views/order-metabox-content.php:380
msgid "Anuluj"
msgstr ""
#: classes/views/dhl-metabox-package.php:343
#: classes/views/order-metabox-content.php:404
msgid "Utwórz"
msgstr ""
#: classes/views/dhl-metabox-package.php:344
#: classes/views/order-metabox-content.php:406
msgid "Zapisz"
msgstr ""
#: classes/views/order-metabox-content.php:40
msgid "Punkt odbioru"
msgstr ""
#: src/WPDesk/DHL/Parcelshop/CheckoutValidator.php:74
msgid "Proszę wybrać punkt odbioru DHL"
msgstr ""
#: templates/dhl-parcelshop-map.php:12
msgid "Wybierz punkt odbioru DHL (Parcelshop)"
msgstr ""
#: templates/woocommerce/email_after_order_table.php:15
#: templates/woocommerce/order_details_after_order_table.php:15
msgid "Odbiór w punkcie"
msgstr ""
#: templates/woocommerce/email_after_order_table.php:22
#: templates/woocommerce/order_details_after_order_table.php:23
msgid "Przesyłka"
msgstr ""
#: templates/woocommerce/email_after_order_table.php:27
#: templates/woocommerce/order_details_after_order_table.php:29
msgid "Śledź przesyłkę: "
msgstr ""
#: templates/woocommerce/shipping-method-after.php:15
msgid "Wybierz punkt odbioru DHL"
msgstr ""
#: templates/woocommerce/shipping-method-after.php:27
msgid "W pobliżu"
msgstr ""
#: templates/woocommerce/shipping-method-after.php:35
msgid "Pozostałe"
msgstr ""
#: templates/woocommerce/shipping-method-after.php:49
msgid "Wybierz punkt na mapie"
msgstr ""
#: templates/woocommerce/shipping-method-after.php:56
msgid "Otwarte:"
msgstr ""
#: templates/woocommerce/shipping-method-after.php:61
msgid "Otwarte w święta:"
msgstr ""
#. Plugin Name of the plugin/theme
msgid "WooCommerce DHL"
msgstr ""
#. Plugin URI of the plugin/theme
msgid "https://www.wpdesk.pl/sklep/dhl-woocommerce/"
msgstr ""
#. Description of the plugin/theme
msgid "Integracja WooCommerce z DHL."
msgstr ""
#. Author of the plugin/theme
msgid "WP Desk"
msgstr "WP Desk"
#. Author URI of the plugin/theme
msgid "https://www.wpdesk.net/"
msgstr "https://www.wpdesk.pl/"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,632 @@
msgid ""
msgstr ""
"Project-Id-Version: WooCommerce DHL\n"
"POT-Creation-Date: 2016-10-14 14:43+0200\n"
"PO-Revision-Date: 2016-10-14 14:43+0200\n"
"Last-Translator: Maciej Swoboda <maciej.swoboda@gmail.com>\n"
"Language-Team: Maciej Swoboda <support@wpdesk.pl>\n"
"Language: pl_PL\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.7\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-WPHeader: woocommerce-dhl.php\n"
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2);\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPathExcluded-0: *.js\n"
#: classes/class-flexible-shipping-hooks.php:28
#: classes/class-shipping-method.php:21 classes/class-shipping-method.php:25
#: classes/class-woocommerce-dhl.php:222
msgid "DHL"
msgstr ""
#: classes/class-flexible-shipping-hooks.php:45
#: classes/views/dhl-metabox-package.php:18
msgid "Usługa DHL"
msgstr ""
#: classes/class-flexible-shipping-hooks.php:51
#: classes/views/dhl-metabox-package.php:34
msgid "Rodzaj przesyłki"
msgstr ""
#: classes/class-flexible-shipping-hooks.php:57
#: classes/views/dhl-metabox-package.php:153
msgid "Ubezpieczenie"
msgstr ""
#: classes/class-flexible-shipping-hooks.php:62
#: classes/views/dhl-metabox-package.php:197
msgid "Pobranie"
msgstr ""
#: classes/class-flexible-shipping-hooks.php:119
msgid "Brak"
msgstr ""
#: classes/class-shipping-method.php:22
msgid ""
"Integracja WooCommerce z DHL. <a href=\"https://www.wpdesk.pl/docs/"
"woocommerce-dhl-docs/\" target=\"_blank\">Zapoznaj się z instrukcją obsługi "
"&rarr;</a>"
msgstr ""
#: classes/class-shipping-method.php:85
#, php-format
msgid "Komunikat API DHL: %s - %s"
msgstr ""
#: classes/class-woocommerce-dhl.php:21
msgid "Przesyłka krajowa"
msgstr ""
#: classes/class-woocommerce-dhl.php:22
msgid "DHL Domestic Express 9"
msgstr ""
#: classes/class-woocommerce-dhl.php:23
msgid "DHL Domestic Express 12"
msgstr ""
#: classes/class-woocommerce-dhl.php:24
msgid "Przesyłka 2Europe"
msgstr ""
#: classes/class-woocommerce-dhl.php:30
msgid "Koperta"
msgstr ""
#: classes/class-woocommerce-dhl.php:31
msgid "Paczka"
msgstr ""
#: classes/class-woocommerce-dhl.php:32
msgid "Paleta"
msgstr ""
#: classes/class-woocommerce-dhl.php:97
msgid "Usunięcie przesyłki: przesyłka nie została odnaleziona."
msgstr ""
#: classes/class-woocommerce-dhl.php:103
msgid "Przesyłka została usunięta."
msgstr ""
#: classes/class-woocommerce-dhl.php:124
#, php-format
msgid "Przesyłka %s została anulowana"
msgstr ""
#: classes/class-woocommerce-dhl.php:171
#, php-format
msgid "Do zamówienia została utworzona przesyłka %s. Szczegóły poniżej."
msgstr ""
#: classes/class-woocommerce-dhl.php:196
msgid "Przesyłka nie została odnaleziona (1)."
msgstr ""
#: classes/class-woocommerce-dhl.php:200
msgid "Przesyłka nie została odnaleziona (2)."
msgstr ""
#: classes/settings-dhl.php:21
msgid "Ustawienia główne"
msgstr ""
#: classes/settings-dhl.php:26
msgid "Włącz/Wyłącz"
msgstr ""
#: classes/settings-dhl.php:28
msgid "Włącz metodę wysyłki"
msgstr ""
#: classes/settings-dhl.php:32
msgid "Logowanie"
msgstr ""
#: classes/settings-dhl.php:37
msgid "Login"
msgstr ""
#: classes/settings-dhl.php:39
msgid "Login do serwisu DHL."
msgstr ""
#: classes/settings-dhl.php:47
msgid "Hasło"
msgstr ""
#: classes/settings-dhl.php:49
msgid "Hasło do serwisu DHL."
msgstr ""
#: classes/settings-dhl.php:57
msgid "Tryb testowy"
msgstr ""
#: classes/settings-dhl.php:58
msgid "Włącz tryb testowy"
msgstr ""
#: classes/settings-dhl.php:60
msgid ""
"Jeśli włączasz tryb testowy - wpisz Login i Hasło API do serwisu testowego, "
"a nie do produkcyjnego. Serwis testowy dostępny jest pod adresem: <a target="
"\"_blank\" href=\"https://sandbox.dhl24.com.pl/\">https://sandbox.dhl24.com."
"pl/</a>"
msgstr ""
#: classes/settings-dhl.php:65
msgid "Domyślne ustawienia przesyłki"
msgstr ""
#: classes/settings-dhl.php:111
msgid "Długość paczki [cm]"
msgstr ""
#: classes/settings-dhl.php:122
msgid "Szerokość paczki [cm]"
msgstr ""
#: classes/settings-dhl.php:133
msgid "Wysokość paczki [cm]"
msgstr ""
#: classes/settings-dhl.php:144
msgid "Waga paczki [kg]"
msgstr ""
#: classes/settings-dhl.php:155
msgid "Zawartość paczki"
msgstr ""
#: classes/settings-dhl.php:160 classes/views/dhl-metabox-package.php:254
msgid "Komentarz"
msgstr ""
#: classes/settings-dhl.php:162
msgid ""
"Komentarz widoczny na etykiecie. Dostępne shortcody [order_number], "
"[shop_name], [shop_url]"
msgstr ""
#: classes/settings-dhl.php:163
msgid "Zamówienie [order_number], [shop_name], [shop_url]"
msgstr ""
#: classes/settings-dhl.php:167
msgid "Etykiety"
msgstr ""
#: classes/settings-dhl.php:172
msgid "Format etykiet"
msgstr ""
#: classes/settings-dhl.php:175
msgid "Etykieta BLP"
msgstr ""
#: classes/settings-dhl.php:176
msgid "Etykieta BLP w formacie PDF A4"
msgstr ""
#: classes/settings-dhl.php:177
msgid "Etykieta BLP w formacie dla drukarek Zebra"
msgstr ""
#: classes/settings-dhl.php:182
msgid "Dane nadawcy"
msgstr ""
#: classes/settings-dhl.php:187
msgid "Numer klienta (SAP)"
msgstr ""
#: classes/settings-dhl.php:192
msgid "Nazwa"
msgstr ""
#: classes/settings-dhl.php:200
msgid "Adres"
msgstr ""
#: classes/settings-dhl.php:208
msgid "Nr budynku"
msgstr ""
#: classes/settings-dhl.php:213
msgid "Nr lokalu"
msgstr ""
#: classes/settings-dhl.php:218
msgid "Kod pocztowy"
msgstr ""
#: classes/settings-dhl.php:226
msgid "Miasto"
msgstr ""
#: classes/settings-dhl.php:231
msgid "Osoba kontaktowa"
msgstr ""
#: classes/settings-dhl.php:239
msgid "Telefon"
msgstr ""
#: classes/settings-dhl.php:247
msgid "E-mail"
msgstr ""
#: classes/views/dhl-metabox-add-package.php:10
msgid "Dodaj przesyłkę"
msgstr ""
#: classes/views/dhl-metabox-package.php:13
#, php-format
msgid "Przesyłka %s"
msgstr ""
#: classes/views/dhl-metabox-package.php:53
msgid "Waga [kg]"
msgstr ""
#: classes/views/dhl-metabox-package.php:71
msgid "Wymiary (dł / sz / wys) [cm]"
msgstr ""
#: classes/views/dhl-metabox-package.php:132
msgid "Data wysyłki"
msgstr ""
#: classes/views/dhl-metabox-package.php:173
msgid "Kwota ubezpieczenia"
msgstr ""
#: classes/views/dhl-metabox-package.php:214
msgid "Kwota pobrania"
msgstr ""
#: classes/views/dhl-metabox-package.php:238
msgid "Zawartość"
msgstr ""
#: classes/views/dhl-metabox-package.php:289
msgid "Przesyłka: "
msgstr ""
#: classes/views/dhl-metabox-package.php:292
msgid "Pobierz etykietę"
msgstr ""
#: classes/views/dhl-metabox-package.php:294
msgid "Anuluj"
msgstr ""
#: classes/views/dhl-metabox-package.php:299
msgid "Utwórz"
msgstr ""
#: classes/views/dhl-metabox-package.php:300
msgid "Zapisz"
msgstr ""
#: classes/views/dhl-metabox-package.php:302
msgid "Usuń"
msgstr ""
#: classes/wpdesk/class-helper.php:36
#, php-format
msgid ""
"The %s%s%s License Key has not been activated, so the plugin is inactive! "
"%sClick here%s to activate the license key and the plugin."
msgstr ""
"Klucz licencyjny wtyczki %s%s%s nie został aktywowany, więc wtyczka jest "
"nieaktywna! %sKliknij tutaj%s, aby aktywować klucz licencyjny wtyczki."
#: classes/wpdesk/class-plugin.php:207
msgid "Docs"
msgstr "Docs"
#: classes/wpdesk/class-plugin.php:208
msgid "Support"
msgstr "Wsparcie"
#: classes/wpdesk/class-plugin.php:214
msgid "Settings"
msgstr "Ustawienia"
#: classes/wpdesk/class-plugin.php:261
#, php-format
msgid ""
"<a href=\"%s\">Install the WP Desk Helper plugin</a> to activate and get "
"updates for your WP Desk plugins."
msgstr ""
"<a href=\"%s\">Zainstaluj wtyczkę WP Desk Helper</a>, aby aktywować i "
"otrzymywać aktualizacje wtyczek WP Desk."
#: classes/wpdesk/class-plugin.php:267
#, php-format
msgid ""
"<a href=\"%s\">Activate the WP Desk Helper plugin</a> to activate and get "
"updates for your WP Desk plugins."
msgstr ""
"<a href=\"%s\">Włącz wtyczkę WP Desk Helper</a>, aby aktywować i otrzymywać "
"aktualizacje wtyczek WP Desk."
#: classes/wpdesk/class-settings.php:84
#: classes/wpdesk/settings-api/class.s214-settings.php:1211
msgid "Insert Image"
msgstr ""
#: classes/wpdesk/class-settings.php:85
#: classes/wpdesk/settings-api/class.s214-settings.php:1212
msgid "Select Image"
msgstr ""
#: classes/wpdesk/settings-api/class.s214-settings.php:144
#: classes/wpdesk/settings-api/class.s214-settings.php:146
msgid "Section214 Settings"
msgstr ""
#: classes/wpdesk/settings-api/class.s214-settings.php:592
msgid "Settings updated."
msgstr "Ustawienia zostały zaktualizowane."
#: classes/wpdesk/settings-api/class.s214-settings.php:977
msgid ""
"To copy the system info, click below then press Ctrl + C (PC) or Cmd + C "
"(Mac)."
msgstr ""
#: classes/wpdesk/settings-api/class.s214-settings.php:980
msgid "Download System Info File"
msgstr ""
#: classes/wpdesk/settings-api/class.s214-settings.php:1060
msgid "Upload File"
msgstr ""
#: classes/wpdesk/settings-api/class.s214-settings.php:1090
msgid "Deactivate License"
msgstr ""
#: classes/wpdesk/settings-api/class.s214-settings.php:1121
#, php-format
msgid ""
"The callback function used for the <strong>%s</strong> setting is missing."
msgstr ""
#: classes/wpdesk/settings-api/modules/licensing/S214_Plugin_Updater.php:188
#, php-format
msgid ""
"There is a new version of %1$s available. %2$sView version %3$s details%4$s."
msgstr ""
#: classes/wpdesk/settings-api/modules/licensing/S214_Plugin_Updater.php:196
#, php-format
msgid ""
"There is a new version of %1$s available. %2$sView version %3$s details%4$s "
"or %5$supdate now%6$s."
msgstr ""
#: classes/wpdesk/settings-api/modules/licensing/S214_Plugin_Updater.php:340
msgid "You do not have permission to install plugin updates"
msgstr ""
#: classes/wpdesk/settings-api/modules/licensing/S214_Plugin_Updater.php:340
#: classes/wpdesk/settings-api/modules/licensing/class.s214-license.php:197
#: classes/wpdesk/settings-api/modules/licensing/class.s214-license.php:270
msgid "Error"
msgstr ""
#: classes/wpdesk/settings-api/modules/licensing/class.s214-license.php:141
msgid "Licensing"
msgstr ""
#: classes/wpdesk/settings-api/modules/licensing/class.s214-license.php:159
#, php-format
msgid "%1$s License Key"
msgstr ""
#: classes/wpdesk/settings-api/modules/licensing/class.s214-license.php:160
msgid "Please enter your license key to enable automatic updates and support."
msgstr ""
#: classes/wpdesk/settings-api/modules/licensing/class.s214-license.php:197
#: classes/wpdesk/settings-api/modules/licensing/class.s214-license.php:270
msgid "Nonce verification failed"
msgstr ""
#: classes/wpdesk/settings-api/modules/licensing/class.s214-license.php:352
msgid "This license does not belong to the product you have entered it for."
msgstr ""
#: classes/wpdesk/settings-api/modules/licensing/class.s214-license.php:357
msgid "This license does not have any activations left"
msgstr ""
#: classes/wpdesk/settings-api/modules/licensing/class.s214-license.php:362
msgid "This license key is expired. Please renew it."
msgstr ""
#: classes/wpdesk/settings-api/modules/licensing/class.s214-license.php:367
#, php-format
msgid ""
"There was a problem activating your license key, please try again or contact "
"support. Error code: %s"
msgstr ""
#: templates/woocommerce/email_after_order_table.php:13
#: templates/woocommerce/order_details_after_order_table.php:14
msgid "Przesyłka"
msgstr ""
#: templates/woocommerce/email_after_order_table.php:18
#: templates/woocommerce/order_details_after_order_table.php:20
msgid "Śledź przesyłkę: "
msgstr ""
#: woocommerce-dhl.php:91
#, php-format
msgid ""
"Wtyczka WooCommerce DHL wymaga wtyczki Flexible Shipping. <a href=\"%s"
"\">Zainstaluj Flexible Shipping →</a>"
msgstr ""
#: woocommerce-dhl.php:97
#, php-format
msgid ""
"Wtyczka WooCommerce DHL wymaga wtyczki Flexible Shipping. <a href=\"%s"
"\">Włącz Flexible Shipping →</a>"
msgstr ""
#: woocommerce-dhl.php:113
msgid "Ustawienia"
msgstr ""
#: woocommerce-dhl.php:114
msgid "Dokumentacja"
msgstr ""
#: woocommerce-dhl.php:115
msgid "Wsparcie"
msgstr ""
#. Plugin Name of the plugin/theme
msgid "WooCommerce DHL"
msgstr ""
#. Plugin URI of the plugin/theme
msgid "https://www.wpdesk.pl/sklep/dhl-woocommerce/"
msgstr ""
#. Description of the plugin/theme
msgid "Integracja WooCommerce z DHL."
msgstr ""
#. Author of the plugin/theme
msgid "WP Desk"
msgstr "WP Desk"
#. Author URI of the plugin/theme
msgid "https://www.wpdesk.pl/"
msgstr ""
#~ msgid "Maximum cost"
#~ msgstr "Maksymalny koszt"
#~ msgid ""
#~ "Set a maximum cost of shipping. This will override the costs configured "
#~ "below."
#~ msgstr ""
#~ "Ustaw maksymalny koszt wysyłki. To nadpisze koszty ustawione w regułach."
#~ msgid "Lowest cost"
#~ msgstr "Najniższy koszt"
#~ msgid "Highest cost"
#~ msgstr "Najwyższy koszt"
#~ msgid "Item"
#~ msgstr "Sztuka"
#~ msgid "Cart line item"
#~ msgstr "Pozycja w koszyku"
#~ msgid "All products"
#~ msgstr "Wszystkie produkty"
#~ msgid "Any class (must be set)"
#~ msgstr "Dowolna klasa (musi być ustawiona)"
#~ msgid "None"
#~ msgstr "Brak"
#~ msgid ""
#~ "An Unexpected HTTP Error occurred during the API request.</p> <p><a href="
#~ "\"?\" onclick=\"document.location.reload(); return false;\">Try again</a>"
#~ msgstr ""
#~ "Wystąpił nieoczekiwany błąd HTTP podczas zapytania API.</p> <p><a "
#~ "href=„?” onclick=„document.location.reload(); return false;”>Spróbuj "
#~ "ponownie</a>"
#~ msgid "An unknown error occurred"
#~ msgstr "Wystąpił nieznany błąd"
#~ msgid "Additional cost"
#~ msgstr "Dodatkowy koszt"
#~ msgid "Enter additional shipping cost based on the Value field."
#~ msgstr "Wpisz dodatkowy koszt bazujący na polu Wartość."
#~ msgid "Value"
#~ msgstr "Wartość"
#~ msgid "Value for additional cost."
#~ msgstr "Wartość dodatkowego kosztu."
#~ msgid "Shipping class"
#~ msgstr "Klasa wysyłkowa"
#~ msgid "Select shipping class that the rule applies to."
#~ msgstr "Wybierz klasę wysyłkową, do której ma być stosowana reguła."
#~ msgid "Stop"
#~ msgstr "Zatrzymaj"
#~ msgid "When this rule is matched stop calculating the following rules."
#~ msgstr ""
#~ "Jeśli zostanie spełniona wybrana reguła, zatrzymaj obliczanie kolejnych "
#~ "reguł."
#~ msgid "Cancel"
#~ msgstr "Anuluj"
#~ msgid "When this rule is matched do not show it in the checkout."
#~ msgstr ""
#~ "Jeśli zostanie spełniona wybrana reguła, nie pokazuj jej w zamówieniu."
#~ msgid "Redirecting. If page not redirects click %s here %s."
#~ msgstr ""
#~ "Przekierowywanie. Jeśli strona nie przekierowuje cię automatycznie, "
#~ "kliknij %s tu %s."
#~ msgid ""
#~ "Flexible Shipping PRO requires Flexible Shipping plugin. <a href=\"%s"
#~ "\">Install Flexible Shipping →</a>"
#~ msgstr ""
#~ "Flexible Shipping PRO wymaga wtyczki Flexible Shipping. <a href=\"%s"
#~ "\">Zainstaluj Flexible Shipping →</a>"
#~ msgid ""
#~ "Flexible Shipping PRO requires Flexible Shipping plugin. <a href=\"%s"
#~ "\">Activate Flexible Shipping →</a>"
#~ msgstr ""
#~ "Flexible Shipping PRO wymaga wtyczki Flexible Shipping. <a href=\"%s"
#~ "\">Włącz Flexible Shipping →</a>"
#~ msgid "Flexible Shipping PRO"
#~ msgstr "Flexible Shipping PRO"
#~ msgid "https://www.wpdesk.net/products/flexible-shipping-pro-woocommerce/"
#~ msgstr "https://www.wpdesk.pl/sklep/flexible-shipping-pro-woocommerce/"
#~ msgid ""
#~ "Extends the free version of Flexible Shipping by adding advanced pro "
#~ "features."
#~ msgstr ""
#~ "Rozszerza bezpłatną wersję Flexible Shipping poprzez dodanie "
#~ "zaawansowanych ustawień."
#~ msgid "https://www.wpdesk.net/"
#~ msgstr "https://www.wpdesk.pl/"

View File

@@ -0,0 +1,79 @@
<?php
namespace WPDesk\DHL;
use WPDesk\DHL\Exceptions\ApiConnectionStatusException;
/**
* Can handle API Connection Status AJAX requests.
*/
class ApiConnectionStatusAjax extends \VendorDHL\WPDesk\WooCommerceShippingMethod\Field\ApiConnectionStatus\ApiConnectionStatusAjax {
/**
* @var \WPDesk_WooCommerce_DHL_Shipping_Method
*/
private $shipping_method;
/**
* @param \WPDesk_WooCommerce_DHL_Shipping_Method $shipping_method .
*/
public function __construct( \WPDesk_WooCommerce_DHL_Shipping_Method $shipping_method ) {
parent::__construct( 'dhl' );
$this->shipping_method = $shipping_method;
}
/**
* @inheritDoc
*
* @throws ApiConnectionStatusException
*/
public function check_api_connection( $field ) {
if ( $field === 'api_status' ) {
$this->check_api_connection_dhl24();
} elseif ( $field === 'api_parcelshop_status' ) {
$this->check_api_connection_parcelshop();
} else {
// Translators: field.
throw new ApiConnectionStatusException( sprintf( __( 'Niepoprawne pole statusu: %1$s!', 'woocommerce-dhl' ), $field ) );
}
}
/**
* @throws ApiConnectionStatusException
*/
private function check_api_connection_dhl24() {
$this->check_credentials( $this->shipping_method->get_option( 'login', '' ), $this->shipping_method->get_option( 'password', '' ) );
$api = $this->shipping_method->get_api();
try {
$api->ping();
} catch ( \Exception $e ) {
throw new ApiConnectionStatusException( $e->getMessage() );
}
}
/**
* @throws ApiConnectionStatusException
*/
private function check_api_connection_parcelshop() {
$this->check_credentials( $this->shipping_method->get_option( 'login_parcelshop', '' ), $this->shipping_method->get_option( 'password_parcelshop', '' ) );
$api = $this->shipping_method->get_parcelshop_api();
try {
$api->ping();
} catch ( \Exception $e ) {
throw new ApiConnectionStatusException( $e->getMessage() );
}
}
/**
* @param string $login .
* @param string $password .
*
* @throws ApiConnectionStatusException
*/
private function check_credentials( $login, $password ) {
if ( '' === trim( $password ) || '' === trim( $login ) ) {
throw new ApiConnectionStatusException( __( 'Wprowadź login i hasło!', 'woocommerce-dhl' ) );
}
}
}

View File

@@ -0,0 +1,10 @@
<?php
namespace WPDesk\DHL\Exceptions;
/**
* Api Connection Status Exception.
*/
class ApiConnectionStatusException extends \RuntimeException {
}

View File

@@ -0,0 +1,36 @@
<?php
namespace WPDesk\DHL;
trait HelperTrait {
/**
* Prepare unique key for set_transient.
*
* @param array $params Params unique key.
* @param string $endpoint Api endpoint. Will be used in transient key.
*
* @return string
*/
private function prepare_transient_key( array $params, $endpoint ) {
$prefix = 'parcel_dhl'; // WARNING: do not use prefix 'dhl' as class-dhl-api can clear it.
$normalized_endpoint = remove_accents( trim( $endpoint, "/ \t\n\r\0\x0B" ) );
$params_hash = md5( json_encode( $params ) );
return implode( '_', [ $prefix, $normalized_endpoint, $params_hash ] );
}
public function cmp_servicepoints( $a, $b ) {
$address_a = $a->address->city . ' ' . $a->address->street . ' ' . $a->address->houseNumber . ' ' . $a->name;
$address_b = $b->address->city . ' ' . $b->address->street . ' ' . $b->address->houseNumber . ' ' . $b->name;
if ( function_exists( 'mb_strtolower' ) ) {
$address_a = mb_strtolower( ( $address_a ) );
$address_b = mb_strtolower( ( $address_b ) );
} else {
$address_a = strtolower( $address_a );
$address_b = strtolower( $address_b );
}
return strcasecmp( $address_a, $address_b );
}
}

View File

@@ -0,0 +1,93 @@
<?php
/**
* Class CheckoutValidator
*
* @package WPDesk\DHL\Parcelshop
*/
namespace WPDesk\DHL\Parcelshop;
use VendorDHL\WPDesk\PluginBuilder\Plugin\Hookable;
/**
* Can add notice when parcelshop is required but not present.
*/
class CheckoutValidator implements Hookable {
/**
* @var \WC_Cart
*/
private $cart;
/**
* @var \WC_Session
*/
private $session;
/**
* @var array
*/
private $post_data;
/**
* CheckoutValidator constructor.
*
* @param \WC_Cart $cart .
* @param \WC_Session $session .
* @param array $post_data .
*/
public function __construct( $cart, $session, $post_data ) {
$this->cart = $cart;
$this->session = $session;
$this->post_data = $post_data;
}
/**
* @return void
*/
public function hooks() {
add_action( 'woocommerce_checkout_process', [ $this, 'add_notice_when_parcel_missing_required_parcelshop' ] );
}
/**
* @internal
*/
public function add_notice_when_parcel_missing_required_parcelshop() {
if ( $this->cart->needs_shipping() ) {
$shippings = $this->session->get( 'chosen_shipping_methods' );
$packages = $this->cart->get_shipping_packages();
$flexible_shipping_rates = $this->get_flexible_shipping_rates();
$dhl_parcelshop = false;
foreach ( $packages as $id => $package ) {
$shipping = $shippings[ $id ];
if ( isset( $flexible_shipping_rates[ $shipping ] ) ) {
$shipping_method = $flexible_shipping_rates[ $shipping ];
if ( $shipping_method['method_integration'] === 'dhl' && $shipping_method['dhl_product'] === 'parcelshop' ) {
$dhl_parcelshop = true;
}
}
}
if ( $dhl_parcelshop && empty( $this->post_data['dhl_parcelshop'] ) ) {
wc_add_notice( __( 'Proszę wybrać punkt odbioru DHL', 'woocommerce-dhl' ), 'error' );
}
}
}
/**
* @return array
*
* @codeCoverageIgnore
*/
protected function get_flexible_shipping_rates() {
$all_shipping_methods = WC()->shipping()->get_shipping_methods();
if ( empty( $all_shipping_methods ) ) {
$all_shipping_methods = WC()->shipping()->load_shipping_methods();
}
return $all_shipping_methods['flexible_shipping']->get_all_rates();
}
}

View File

@@ -0,0 +1,22 @@
<?php
/**
* Trait SanitizeTrait
*
* @package WPDesk\DHL
*/
namespace WPDesk\DHL;
/**
* Helpers for Sanitize
*/
trait SanitizeTrait {
/**
* @param int|string|bool $value .
*
* @return bool
*/
private function get_bool_value( $value ): bool {
return filter_var( $value, FILTER_VALIDATE_BOOLEAN, [ 'options' => [ 'default' => false ] ] );
}
}

View File

@@ -0,0 +1,31 @@
<?php
/**
* .
*
* @var string[] $args .
*
* @package DHL
*/
?>
<html>
<title><?php esc_html_e( 'Wybierz punkt odbioru DHL (Parcelshop)', 'woocommerce-dhl' ); ?></title>
<body>
<iframe src="<?php echo esc_url( $args['map_url'] ); ?>"
style="position:fixed; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;">
</iframe>
<script type="text/javascript">
/*<![CDATA[*/
function listenMessage( msg ) {
parent.dhl_set_dhl_parcelshop( JSON.parse( msg.data ) );
}
if ( window.addEventListener ) {
window.addEventListener( "message", listenMessage, false );
} else {
window.attachEvent( "onmessage", listenMessage );
}
/*]]>*/
</script>
</body>
</html>

View File

@@ -0,0 +1,32 @@
<?php
/**
* Linki do śledzenia przesyłki
*
* This template can be overridden by copying it to yourtheme/woocommerce-dhl/woocommerce/email_after_order_table.php
*
* @author WP Desk
* @version 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
?>
<?php if ( isset( $service_point_data ) ) : ?>
<header>
<h2><?php _e( 'Odbiór w punkcie', 'woocommerce-dhl' ); ?></h2>
<p><?php echo $service_point_data->name; ?></p>
<?php echo $service_point_data->formated_address; ?>
<p></p>
</header>
<?php endif; ?>
<?php if ( isset( $dhl_packages ) && count( $dhl_packages ) ) : ?>
<h2><?php _e( 'Przesyłka', 'woocommerce-dhl' ); ?></h2>
<?php
foreach ( $dhl_packages as $dhl_package ) {
?>
<p>
<?php _e( 'Śledź przesyłkę: ', 'woocommerce-dhl' ); ?><a target="_blank" href="<?php echo $dhl_package['tracking_url']; ?>"><?php echo $dhl_package['shipment_id']; ?></a>
</p>
<?php
}
?>
<?php endif; ?>

View File

@@ -0,0 +1,34 @@
<?php
/**
* Linki do śledzenia przesyłki
*
* This template can be overridden by copying it to yourtheme/woocommerce-dhl/woocommerce/email_after_order_table.php
*
* @author WP Desk
* @version 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
?>
<?php if ( isset( $service_point_data ) ) : ?>
<header>
<h2><?php _e( 'Odbiór w punkcie', 'woocommerce-dhl' ); ?></h2>
<p><?php echo $service_point_data->name; ?></p>
<?php echo $service_point_data->formated_address; ?>
<p></p>
</header>
<?php endif; ?>
<?php if ( isset( $dhl_packages ) && count( $dhl_packages ) ) : ?>
<header>
<h2><?php _e( 'Przesyłka', 'woocommerce-dhl' ); ?></h2>
</header>
<?php
foreach ( $dhl_packages as $dhl_package ) {
?>
<p>
<?php _e( 'Śledź przesyłkę: ', 'woocommerce-dhl' ); ?><a target="_blank" href="<?php echo $dhl_package['tracking_url']; ?>"><?php echo $dhl_package['shipment_id']; ?></a>
</p>
<?php
}
?>
<?php endif; ?>

View File

@@ -0,0 +1,95 @@
<?php
/**
* .
*
* @var string[] $args .
*
* @package DHL
*/
?>
<tr class="woocommerce-shipping-totals shipping dhl-parcelshop-select">
<th>
<?php esc_html_e( 'Punkt odbioru DHL', 'woocommerce-dhl' ); ?>
</th>
<td>
<div>
<select id="dhl_parcelshop" name="dhl_parcelshop"
data-dhl_parcelshop_cod="<?php echo esc_attr( $args[ WPDesk_WooCommerce_DHL::COD_SESSION_FIELD ] ); ?>"
data-country="<?php echo esc_attr( $args[ WPDesk_WooCommerce_DHL::COUNTRY_FIELD ] ); ?>"
data-city="<?php echo esc_attr( $args[ WPDesk_WooCommerce_DHL::CITY_FIELD ] ); ?>"
data-address="<?php echo esc_attr( $args[ WPDesk_WooCommerce_DHL::ADDRESS_FIELD ] ); ?>"
data-postcode="<?php echo esc_attr( $args[ WPDesk_WooCommerce_DHL::POSTCODE_FIELD ] ); ?>"
>
<option value=""><?php esc_html_e( 'Wybierz punkt odbioru', 'woocommerce-dhl' ); ?></option>
<?php if ( 'select2_ajax' === $args['select_type'] ) : ?>
<?php if ( $dhl_selected_parcelshop_name ) : ?>
<option selected
value="<?php echo esc_attr( $dhl_selected_parcelshop ); ?>"><?php echo esc_html( $dhl_selected_parcelshop_name ); ?></option>
<?php endif; ?>
<?php else : ?>
<?php if ( count( $dhl_parcelshop_nearest ) ) : ?>
<optgroup label="<?php esc_attr_e( 'W pobliżu', 'woocommerce-dhl' ); ?>">
<?php foreach ( $dhl_parcelshop_nearest as $key => $parcelshop ) : ?>
<?php $selected = ( $key == $dhl_selected_parcelshop ? 'selected' : '' ); ?>
<option value="<?php echo esc_attr( $key ); ?>" <?php echo esc_attr( $selected ); ?>><?php echo esc_html( $parcelshop ); ?></option>
<?php endforeach; ?>
</optgroup>
<?php endif; ?>
<?php if ( count( $dhl_parcelshop_nearest ) ) : ?>
<optgroup label="<?php esc_attr_e( 'Pozostałe', 'woocommerce-dhl' ); ?>">
<?php endif; ?>
<?php foreach ( $dhl_parcelshop_other as $key => $parcelshop ) : ?>
<?php $selected = ( $key == $dhl_selected_parcelshop ? 'selected' : '' ); ?>
<option value="<?php echo esc_attr( $key ); ?>" <?php echo esc_attr( $selected ); ?>><?php echo esc_html( $parcelshop ); ?></option>
<?php endforeach; ?>
<?php if ( count( $dhl_parcelshop_nearest ) ) : ?>
</optgroup>
<?php endif; ?>
<?php endif; ?>
</select>
</div>
<div>
<a href="#0"
data-dhl_parcelshop_cod="<?php echo esc_attr( $args[ WPDesk_WooCommerce_DHL::COD_SESSION_FIELD ] ); ?>"
data-country="<?php echo esc_attr( $args[ WPDesk_WooCommerce_DHL::COUNTRY_FIELD ] ); ?>"
data-city="<?php echo esc_attr( $args[ WPDesk_WooCommerce_DHL::CITY_FIELD ] ); ?>"
data-address="<?php echo esc_attr( $args[ WPDesk_WooCommerce_DHL::ADDRESS_FIELD ] ); ?>"
data-postcode="<?php echo esc_attr( $args[ WPDesk_WooCommerce_DHL::POSTCODE_FIELD ] ); ?>"
id="dhl-parcelshop-select-map"><?php esc_html_e( 'Wybierz punkt na mapie', 'woocommerce-dhl' ); ?></a>
<div class="js--popup-container-dhl"></div>
<?php if ( ! $dhl_parcelshop_nearest && ! $dhl_parcelshop_other ) : ?>
<br/>
<p><?php esc_html_e( 'Nieprawidłowy kod pocztowy dla wybranej lokalizacji. Wprowadź poprawny kod pocztowy, by wyświetlić listę dostępnych punktów odbioru.', 'woocommerce-dhl' ); ?></p>
<?php endif; ?>
</div>
<?php if ( ! empty( $dhl_selected_parcelshop ) ) : ?>
<div id="dhl_parcelshop_details">
<span class="dhl-parcelshop-name"><?php echo esc_html( $dhl_parcelshop_name ); ?></span>
<span class="dhl-parcelshop-address-street"><?php echo esc_html( $dhl_parcelshop_street ); ?></span>
<span class="dhl-parcelshop-address-city"><?php echo esc_html( $dhl_parcelshop_city ); ?></span>
<?php if ( ! empty( $dhl_parcelshop_working_hours ) ) : ?>
<div>
<span class="dhl-parcelshop-working-hours-header"><?php esc_html_e( 'Otwarte:', 'woocommerce-dhl' ); ?></span>
<ul class="dhl-parcelshop-wordking-hours">
<?php echo wp_kses_post( $dhl_parcelshop_working_hours ); ?>
</ul>
</div>
<?php endif; ?>
<?php if ( ! empty( $dhl_parcelshop_working_hours_holiday ) ) : ?>
<div>
<span class="dhl-parcelshop-working-hours-holiday">
<?php esc_html_e( 'Otwarte w święta:', 'woocommerce-dhl' ); ?>
<strong><?php echo wp_kses_post( $dhl_parcelshop_working_hours_holiday ); ?></strong>
</span>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
</td>
</tr>

View File

@@ -0,0 +1,25 @@
<?php
// autoload.php @generated by Composer
if (PHP_VERSION_ID < 50600) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, $err);
} elseif (!headers_sent()) {
echo $err;
}
}
trigger_error(
$err,
E_USER_ERROR
);
}
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitd27e5075b40a04be2431bf30932aa2cd::getLoader();

View File

@@ -0,0 +1,585 @@
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Autoload;
/**
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
*
* $loader = new \Composer\Autoload\ClassLoader();
*
* // register classes with namespaces
* $loader->add('Symfony\Component', __DIR__.'/component');
* $loader->add('Symfony', __DIR__.'/framework');
*
* // activate the autoloader
* $loader->register();
*
* // to enable searching the include path (eg. for PEAR packages)
* $loader->setUseIncludePath(true);
*
* In this example, if you try to use a class in the Symfony\Component
* namespace or one of its children (Symfony\Component\Console for instance),
* the autoloader will first look for the class under the component/
* directory, and it will then fallback to the framework/ directory if not
* found before giving up.
*
* This class is loosely based on the Symfony UniversalClassLoader.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @see https://www.php-fig.org/psr/psr-0/
* @see https://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
/** @var \Closure(string):void */
private static $includeFile;
/** @var ?string */
private $vendorDir;
// PSR-4
/**
* @var array[]
* @psalm-var array<string, array<string, int>>
*/
private $prefixLengthsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, array<int, string>>
*/
private $prefixDirsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr4 = array();
// PSR-0
/**
* @var array[]
* @psalm-var array<string, array<string, string[]>>
*/
private $prefixesPsr0 = array();
/**
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr0 = array();
/** @var bool */
private $useIncludePath = false;
/**
* @var string[]
* @psalm-var array<string, string>
*/
private $classMap = array();
/** @var bool */
private $classMapAuthoritative = false;
/**
* @var bool[]
* @psalm-var array<string, bool>
*/
private $missingClasses = array();
/** @var ?string */
private $apcuPrefix;
/**
* @var self[]
*/
private static $registeredLoaders = array();
/**
* @param ?string $vendorDir
*/
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
self::initializeIncludeClosure();
}
/**
* @return string[]
*/
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
}
return array();
}
/**
* @return array[]
* @psalm-return array<string, array<int, string>>
*/
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
/**
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
/**
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
/**
* @return string[] Array of classname => path
* @psalm-return array<string, string>
*/
public function getClassMap()
{
return $this->classMap;
}
/**
* @param string[] $classMap Class to filename map
* @psalm-param array<string, string> $classMap
*
* @return void
*/
public function addClassMap(array $classMap)
{
if ($this->classMap) {
$this->classMap = array_merge($this->classMap, $classMap);
} else {
$this->classMap = $classMap;
}
}
/**
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
* @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*
* @return void
*/
public function add($prefix, $paths, $prepend = false)
{
if (!$prefix) {
if ($prepend) {
$this->fallbackDirsPsr0 = array_merge(
(array) $paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
(array) $paths
);
}
return;
}
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
(array) $paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
(array) $paths
);
}
}
/**
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
(array) $paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
(array) $paths
);
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
// Register directories for a new namespace.
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
(array) $paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
(array) $paths
);
}
}
/**
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
* @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 base directories
*
* @return void
*/
public function set($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr0 = (array) $paths;
} else {
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
}
}
/**
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function setPsr4($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr4 = (array) $paths;
} else {
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
}
}
/**
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
*
* @return void
*/
public function setUseIncludePath($useIncludePath)
{
$this->useIncludePath = $useIncludePath;
}
/**
* Can be used to check if the autoloader uses the include path to check
* for classes.
*
* @return bool
*/
public function getUseIncludePath()
{
return $this->useIncludePath;
}
/**
* Turns off searching the prefix and fallback directories for classes
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
*
* @return void
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
$this->classMapAuthoritative = $classMapAuthoritative;
}
/**
* Should class lookup fail if not found in the current class map?
*
* @return bool
*/
public function isClassMapAuthoritative()
{
return $this->classMapAuthoritative;
}
/**
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
*
* @return void
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
}
/**
* The APCu prefix in use, or null if APCu caching is not enabled.
*
* @return string|null
*/
public function getApcuPrefix()
{
return $this->apcuPrefix;
}
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
*
* @return void
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
if (null === $this->vendorDir) {
return;
}
if ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
self::$registeredLoaders[$this->vendorDir] = $this;
}
}
/**
* Unregisters this instance as an autoloader.
*
* @return void
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return true|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
$includeFile = self::$includeFile;
$includeFile($file);
return true;
}
return null;
}
/**
* Finds the path to the file where the class is defined.
*
* @param string $class The name of the class
*
* @return string|false The path if found, false otherwise
*/
public function findFile($class)
{
// class map lookup
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
}
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
return false;
}
if (null !== $this->apcuPrefix) {
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
if ($hit) {
return $file;
}
}
$file = $this->findFileWithExtension($class, '.php');
// Search for Hack files if we are running on HHVM
if (false === $file && defined('HHVM_VERSION')) {
$file = $this->findFileWithExtension($class, '.hh');
}
if (null !== $this->apcuPrefix) {
apcu_add($this->apcuPrefix.$class, $file);
}
if (false === $file) {
// Remember that this class does not exist.
$this->missingClasses[$class] = true;
}
return $file;
}
/**
* Returns the currently registered loaders indexed by their corresponding vendor directories.
*
* @return self[]
*/
public static function getRegisteredLoaders()
{
return self::$registeredLoaders;
}
/**
* @param string $class
* @param string $ext
* @return string|false
*/
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath . '\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
if (file_exists($file = $dir . $pathEnd)) {
return $file;
}
}
}
}
}
// PSR-4 fallback dirs
foreach ($this->fallbackDirsPsr4 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
return $file;
}
}
// PSR-0 lookup
if (false !== $pos = strrpos($class, '\\')) {
// namespaced class name
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
} else {
// PEAR-like class name
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
}
if (isset($this->prefixesPsr0[$first])) {
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
if (0 === strpos($class, $prefix)) {
foreach ($dirs as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
}
}
}
// PSR-0 fallback dirs
foreach ($this->fallbackDirsPsr0 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
// PSR-0 include paths.
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
return $file;
}
return false;
}
/**
* @return void
*/
private static function initializeIncludeClosure()
{
if (self::$includeFile !== null) {
return;
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
self::$includeFile = \Closure::bind(static function($file) {
include $file;
}, null, null);
}
}

View File

@@ -0,0 +1,352 @@
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer;
use Composer\Autoload\ClassLoader;
use Composer\Semver\VersionParser;
/**
* This class is copied in every Composer installed project and available to all
*
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
*
* To require its presence, you can require `composer-runtime-api ^2.0`
*
* @final
*/
class InstalledVersions
{
/**
* @var mixed[]|null
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
*/
private static $installed;
/**
* @var bool|null
*/
private static $canGetVendors;
/**
* @var array[]
* @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static $installedByVendor = array();
/**
* Returns a list of all package names which are present, either by being installed, replaced or provided
*
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackages()
{
$packages = array();
foreach (self::getInstalled() as $installed) {
$packages[] = array_keys($installed['versions']);
}
if (1 === \count($packages)) {
return $packages[0];
}
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
}
/**
* Returns a list of all package names with a specific type e.g. 'library'
*
* @param string $type
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackagesByType($type)
{
$packagesByType = array();
foreach (self::getInstalled() as $installed) {
foreach ($installed['versions'] as $name => $package) {
if (isset($package['type']) && $package['type'] === $type) {
$packagesByType[] = $name;
}
}
}
return $packagesByType;
}
/**
* Checks whether the given package is installed
*
* This also returns true if the package name is provided or replaced by another package
*
* @param string $packageName
* @param bool $includeDevRequirements
* @return bool
*/
public static function isInstalled($packageName, $includeDevRequirements = true)
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
}
}
return false;
}
/**
* Checks whether the given package satisfies a version constraint
*
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
*
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
*
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
* @param string $packageName
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
* @return bool
*/
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints($constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
}
/**
* Returns a version constraint representing all the range(s) which are installed for a given package
*
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
* whether a given version of a package is installed, and not just whether it exists
*
* @param string $packageName
* @return string Version constraint usable with composer/semver
*/
public static function getVersionRanges($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
$ranges = array();
if (isset($installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
}
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
}
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
}
if (array_key_exists('provided', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
}
return implode(' || ', $ranges);
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['version'])) {
return null;
}
return $installed['versions'][$packageName]['version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getPrettyVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
return null;
}
return $installed['versions'][$packageName]['pretty_version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
*/
public static function getReference($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['reference'])) {
return null;
}
return $installed['versions'][$packageName]['reference'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
*/
public static function getInstallPath($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @return array
* @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
*/
public static function getRootPackage()
{
$installed = self::getInstalled();
return $installed[0]['root'];
}
/**
* Returns the raw installed.php data for custom implementations
*
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
* @return array[]
* @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
*/
public static function getRawData()
{
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = include __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}
return self::$installed;
}
/**
* Returns the raw data of all installed.php which are currently loaded for custom implementations
*
* @return array[]
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
public static function getAllRawData()
{
return self::getInstalled();
}
/**
* Lets you reload the static array from another file
*
* This is only useful for complex integrations in which a project needs to use
* this class but then also needs to execute another project's autoloader in process,
* and wants to ensure both projects have access to their version of installed.php.
*
* A typical case would be PHPUnit, where it would need to make sure it reads all
* the data it needs from this class, then call reload() with
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
* the project in which it runs can then also use this class safely, without
* interference between PHPUnit's dependencies and the project's dependencies.
*
* @param array[] $data A vendor/composer/installed.php data set
* @return void
*
* @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
*/
public static function reload($data)
{
self::$installed = $data;
self::$installedByVendor = array();
}
/**
* @return array[]
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static function getInstalled()
{
if (null === self::$canGetVendors) {
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
}
$installed = array();
if (self::$canGetVendors) {
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1];
}
}
}
}
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = require __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}
$installed[] = self::$installed;
return $installed;
}
}

View File

@@ -0,0 +1,370 @@
<?php
// autoload_classmap.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'VendorDHL\\Monolog\\ErrorHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/ErrorHandler.php',
'VendorDHL\\Monolog\\Formatter\\ChromePHPFormatter' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php',
'VendorDHL\\Monolog\\Formatter\\ElasticaFormatter' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php',
'VendorDHL\\Monolog\\Formatter\\FlowdockFormatter' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php',
'VendorDHL\\Monolog\\Formatter\\FluentdFormatter' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php',
'VendorDHL\\Monolog\\Formatter\\FormatterInterface' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php',
'VendorDHL\\Monolog\\Formatter\\GelfMessageFormatter' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php',
'VendorDHL\\Monolog\\Formatter\\HtmlFormatter' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php',
'VendorDHL\\Monolog\\Formatter\\JsonFormatter' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php',
'VendorDHL\\Monolog\\Formatter\\LineFormatter' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/LineFormatter.php',
'VendorDHL\\Monolog\\Formatter\\LogglyFormatter' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php',
'VendorDHL\\Monolog\\Formatter\\LogstashFormatter' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php',
'VendorDHL\\Monolog\\Formatter\\MongoDBFormatter' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php',
'VendorDHL\\Monolog\\Formatter\\NormalizerFormatter' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php',
'VendorDHL\\Monolog\\Formatter\\ScalarFormatter' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php',
'VendorDHL\\Monolog\\Formatter\\WildfireFormatter' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php',
'VendorDHL\\Monolog\\Handler\\AbstractHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/AbstractHandler.php',
'VendorDHL\\Monolog\\Handler\\AbstractProcessingHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php',
'VendorDHL\\Monolog\\Handler\\AbstractSyslogHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php',
'VendorDHL\\Monolog\\Handler\\AmqpHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/AmqpHandler.php',
'VendorDHL\\Monolog\\Handler\\BrowserConsoleHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php',
'VendorDHL\\Monolog\\Handler\\BufferHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/BufferHandler.php',
'VendorDHL\\Monolog\\Handler\\ChromePHPHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php',
'VendorDHL\\Monolog\\Handler\\CouchDBHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php',
'VendorDHL\\Monolog\\Handler\\CubeHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/CubeHandler.php',
'VendorDHL\\Monolog\\Handler\\Curl\\Util' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/Curl/Util.php',
'VendorDHL\\Monolog\\Handler\\DeduplicationHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php',
'VendorDHL\\Monolog\\Handler\\DoctrineCouchDBHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php',
'VendorDHL\\Monolog\\Handler\\DynamoDbHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php',
'VendorDHL\\Monolog\\Handler\\ElasticSearchHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php',
'VendorDHL\\Monolog\\Handler\\ErrorLogHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php',
'VendorDHL\\Monolog\\Handler\\FilterHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FilterHandler.php',
'VendorDHL\\Monolog\\Handler\\FingersCrossedHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php',
'VendorDHL\\Monolog\\Handler\\FingersCrossed\\ActivationStrategyInterface' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php',
'VendorDHL\\Monolog\\Handler\\FingersCrossed\\ChannelLevelActivationStrategy' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php',
'VendorDHL\\Monolog\\Handler\\FingersCrossed\\ErrorLevelActivationStrategy' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php',
'VendorDHL\\Monolog\\Handler\\FirePHPHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php',
'VendorDHL\\Monolog\\Handler\\FleepHookHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php',
'VendorDHL\\Monolog\\Handler\\FlowdockHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php',
'VendorDHL\\Monolog\\Handler\\FormattableHandlerInterface' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php',
'VendorDHL\\Monolog\\Handler\\FormattableHandlerTrait' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php',
'VendorDHL\\Monolog\\Handler\\GelfHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/GelfHandler.php',
'VendorDHL\\Monolog\\Handler\\GroupHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/GroupHandler.php',
'VendorDHL\\Monolog\\Handler\\HandlerInterface' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/HandlerInterface.php',
'VendorDHL\\Monolog\\Handler\\HandlerWrapper' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php',
'VendorDHL\\Monolog\\Handler\\HipChatHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/HipChatHandler.php',
'VendorDHL\\Monolog\\Handler\\IFTTTHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php',
'VendorDHL\\Monolog\\Handler\\InsightOpsHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php',
'VendorDHL\\Monolog\\Handler\\LogEntriesHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php',
'VendorDHL\\Monolog\\Handler\\LogglyHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/LogglyHandler.php',
'VendorDHL\\Monolog\\Handler\\MailHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/MailHandler.php',
'VendorDHL\\Monolog\\Handler\\MandrillHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/MandrillHandler.php',
'VendorDHL\\Monolog\\Handler\\MissingExtensionException' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php',
'VendorDHL\\Monolog\\Handler\\MongoDBHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php',
'VendorDHL\\Monolog\\Handler\\NativeMailerHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php',
'VendorDHL\\Monolog\\Handler\\NewRelicHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php',
'VendorDHL\\Monolog\\Handler\\NullHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/NullHandler.php',
'VendorDHL\\Monolog\\Handler\\PHPConsoleHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php',
'VendorDHL\\Monolog\\Handler\\ProcessableHandlerInterface' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php',
'VendorDHL\\Monolog\\Handler\\ProcessableHandlerTrait' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php',
'VendorDHL\\Monolog\\Handler\\PsrHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/PsrHandler.php',
'VendorDHL\\Monolog\\Handler\\PushoverHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/PushoverHandler.php',
'VendorDHL\\Monolog\\Handler\\RavenHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RavenHandler.php',
'VendorDHL\\Monolog\\Handler\\RedisHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RedisHandler.php',
'VendorDHL\\Monolog\\Handler\\RollbarHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RollbarHandler.php',
'VendorDHL\\Monolog\\Handler\\RotatingFileHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php',
'VendorDHL\\Monolog\\Handler\\SamplingHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SamplingHandler.php',
'VendorDHL\\Monolog\\Handler\\SlackHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SlackHandler.php',
'VendorDHL\\Monolog\\Handler\\SlackWebhookHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php',
'VendorDHL\\Monolog\\Handler\\Slack\\SlackRecord' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php',
'VendorDHL\\Monolog\\Handler\\SlackbotHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SlackbotHandler.php',
'VendorDHL\\Monolog\\Handler\\SocketHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SocketHandler.php',
'VendorDHL\\Monolog\\Handler\\StreamHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/StreamHandler.php',
'VendorDHL\\Monolog\\Handler\\SwiftMailerHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php',
'VendorDHL\\Monolog\\Handler\\SyslogHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SyslogHandler.php',
'VendorDHL\\Monolog\\Handler\\SyslogUdpHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php',
'VendorDHL\\Monolog\\Handler\\SyslogUdp\\UdpSocket' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php',
'VendorDHL\\Monolog\\Handler\\TestHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/TestHandler.php',
'VendorDHL\\Monolog\\Handler\\WhatFailureGroupHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php',
'VendorDHL\\Monolog\\Handler\\ZendMonitorHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php',
'VendorDHL\\Monolog\\Logger' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Logger.php',
'VendorDHL\\Monolog\\Processor\\GitProcessor' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Processor/GitProcessor.php',
'VendorDHL\\Monolog\\Processor\\IntrospectionProcessor' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php',
'VendorDHL\\Monolog\\Processor\\MemoryPeakUsageProcessor' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php',
'VendorDHL\\Monolog\\Processor\\MemoryProcessor' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php',
'VendorDHL\\Monolog\\Processor\\MemoryUsageProcessor' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php',
'VendorDHL\\Monolog\\Processor\\MercurialProcessor' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php',
'VendorDHL\\Monolog\\Processor\\ProcessIdProcessor' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php',
'VendorDHL\\Monolog\\Processor\\ProcessorInterface' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php',
'VendorDHL\\Monolog\\Processor\\PsrLogMessageProcessor' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php',
'VendorDHL\\Monolog\\Processor\\TagProcessor' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Processor/TagProcessor.php',
'VendorDHL\\Monolog\\Processor\\UidProcessor' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Processor/UidProcessor.php',
'VendorDHL\\Monolog\\Processor\\WebProcessor' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Processor/WebProcessor.php',
'VendorDHL\\Monolog\\Registry' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Registry.php',
'VendorDHL\\Monolog\\ResettableInterface' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/ResettableInterface.php',
'VendorDHL\\Monolog\\SignalHandler' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/SignalHandler.php',
'VendorDHL\\Monolog\\Utils' => $baseDir . '/vendor_prefixed/monolog/monolog/src/Monolog/Utils.php',
'VendorDHL\\Octolize\\Tracker\\OptInNotice\\OptInNotice' => $baseDir . '/vendor_prefixed/octolize/wp-octolize-tracker/src/OptInNotice/OptInNotice.php',
'VendorDHL\\Octolize\\Tracker\\OptInNotice\\ShouldDisplay' => $baseDir . '/vendor_prefixed/octolize/wp-octolize-tracker/src/OptInNotice/ShouldDisplay.php',
'VendorDHL\\Octolize\\Tracker\\OptInNotice\\ShouldDisplayAlways' => $baseDir . '/vendor_prefixed/octolize/wp-octolize-tracker/src/OptInNotice/ShouldDisplayAlways.php',
'VendorDHL\\Octolize\\Tracker\\OptInNotice\\ShouldDisplayAndConditions' => $baseDir . '/vendor_prefixed/octolize/wp-octolize-tracker/src/OptInNotice/ShouldDisplayAndConditions.php',
'VendorDHL\\Octolize\\Tracker\\OptInNotice\\ShouldDisplayGetParameterPresent' => $baseDir . '/vendor_prefixed/octolize/wp-octolize-tracker/src/OptInNotice/ShouldDisplayGetParameterPresent.php',
'VendorDHL\\Octolize\\Tracker\\OptInNotice\\ShouldDisplayGetParameterValue' => $baseDir . '/vendor_prefixed/octolize/wp-octolize-tracker/src/OptInNotice/ShouldDisplayGetParameterValue.php',
'VendorDHL\\Octolize\\Tracker\\OptInNotice\\ShouldDisplayNever' => $baseDir . '/vendor_prefixed/octolize/wp-octolize-tracker/src/OptInNotice/ShouldDisplayNever.php',
'VendorDHL\\Octolize\\Tracker\\OptInNotice\\ShouldDisplayOrConditions' => $baseDir . '/vendor_prefixed/octolize/wp-octolize-tracker/src/OptInNotice/ShouldDisplayOrConditions.php',
'VendorDHL\\Octolize\\Tracker\\OptInNotice\\ShouldDisplayShippingMethodInstanceSettings' => $baseDir . '/vendor_prefixed/octolize/wp-octolize-tracker/src/OptInNotice/ShouldDisplayShippingMethodInstanceSettings.php',
'VendorDHL\\Octolize\\Tracker\\SenderRegistrator' => $baseDir . '/vendor_prefixed/octolize/wp-octolize-tracker/src/SenderRegistrator.php',
'VendorDHL\\Octolize\\Tracker\\SenderToOctolize' => $baseDir . '/vendor_prefixed/octolize/wp-octolize-tracker/src/SenderToOctolize.php',
'VendorDHL\\Octolize\\Tracker\\TrackerInitializer' => $baseDir . '/vendor_prefixed/octolize/wp-octolize-tracker/src/TrackerInitializer.php',
'VendorDHL\\Psr\\Container\\ContainerExceptionInterface' => $baseDir . '/vendor_prefixed/psr/container/src/ContainerExceptionInterface.php',
'VendorDHL\\Psr\\Container\\ContainerInterface' => $baseDir . '/vendor_prefixed/psr/container/src/ContainerInterface.php',
'VendorDHL\\Psr\\Container\\NotFoundExceptionInterface' => $baseDir . '/vendor_prefixed/psr/container/src/NotFoundExceptionInterface.php',
'VendorDHL\\Psr\\EventDispatcher\\EventDispatcherInterface' => $baseDir . '/vendor_prefixed/psr/event-dispatcher/src/EventDispatcherInterface.php',
'VendorDHL\\Psr\\EventDispatcher\\ListenerProviderInterface' => $baseDir . '/vendor_prefixed/psr/event-dispatcher/src/ListenerProviderInterface.php',
'VendorDHL\\Psr\\EventDispatcher\\StoppableEventInterface' => $baseDir . '/vendor_prefixed/psr/event-dispatcher/src/StoppableEventInterface.php',
'VendorDHL\\Psr\\Http\\Client\\ClientExceptionInterface' => $baseDir . '/vendor_prefixed/psr/http-client/src/ClientExceptionInterface.php',
'VendorDHL\\Psr\\Http\\Client\\ClientInterface' => $baseDir . '/vendor_prefixed/psr/http-client/src/ClientInterface.php',
'VendorDHL\\Psr\\Http\\Client\\NetworkExceptionInterface' => $baseDir . '/vendor_prefixed/psr/http-client/src/NetworkExceptionInterface.php',
'VendorDHL\\Psr\\Http\\Client\\RequestExceptionInterface' => $baseDir . '/vendor_prefixed/psr/http-client/src/RequestExceptionInterface.php',
'VendorDHL\\Psr\\Http\\Message\\MessageInterface' => $baseDir . '/vendor_prefixed/psr/http-message/src/MessageInterface.php',
'VendorDHL\\Psr\\Http\\Message\\RequestFactoryInterface' => $baseDir . '/vendor_prefixed/psr/http-factory/src/RequestFactoryInterface.php',
'VendorDHL\\Psr\\Http\\Message\\RequestInterface' => $baseDir . '/vendor_prefixed/psr/http-message/src/RequestInterface.php',
'VendorDHL\\Psr\\Http\\Message\\ResponseFactoryInterface' => $baseDir . '/vendor_prefixed/psr/http-factory/src/ResponseFactoryInterface.php',
'VendorDHL\\Psr\\Http\\Message\\ResponseInterface' => $baseDir . '/vendor_prefixed/psr/http-message/src/ResponseInterface.php',
'VendorDHL\\Psr\\Http\\Message\\ServerRequestFactoryInterface' => $baseDir . '/vendor_prefixed/psr/http-factory/src/ServerRequestFactoryInterface.php',
'VendorDHL\\Psr\\Http\\Message\\ServerRequestInterface' => $baseDir . '/vendor_prefixed/psr/http-message/src/ServerRequestInterface.php',
'VendorDHL\\Psr\\Http\\Message\\StreamFactoryInterface' => $baseDir . '/vendor_prefixed/psr/http-factory/src/StreamFactoryInterface.php',
'VendorDHL\\Psr\\Http\\Message\\StreamInterface' => $baseDir . '/vendor_prefixed/psr/http-message/src/StreamInterface.php',
'VendorDHL\\Psr\\Http\\Message\\UploadedFileFactoryInterface' => $baseDir . '/vendor_prefixed/psr/http-factory/src/UploadedFileFactoryInterface.php',
'VendorDHL\\Psr\\Http\\Message\\UploadedFileInterface' => $baseDir . '/vendor_prefixed/psr/http-message/src/UploadedFileInterface.php',
'VendorDHL\\Psr\\Http\\Message\\UriFactoryInterface' => $baseDir . '/vendor_prefixed/psr/http-factory/src/UriFactoryInterface.php',
'VendorDHL\\Psr\\Http\\Message\\UriInterface' => $baseDir . '/vendor_prefixed/psr/http-message/src/UriInterface.php',
'VendorDHL\\Psr\\Log\\AbstractLogger' => $baseDir . '/vendor_prefixed/psr/log/Psr/Log/AbstractLogger.php',
'VendorDHL\\Psr\\Log\\InvalidArgumentException' => $baseDir . '/vendor_prefixed/psr/log/Psr/Log/InvalidArgumentException.php',
'VendorDHL\\Psr\\Log\\LogLevel' => $baseDir . '/vendor_prefixed/psr/log/Psr/Log/LogLevel.php',
'VendorDHL\\Psr\\Log\\LoggerAwareInterface' => $baseDir . '/vendor_prefixed/psr/log/Psr/Log/LoggerAwareInterface.php',
'VendorDHL\\Psr\\Log\\LoggerAwareTrait' => $baseDir . '/vendor_prefixed/psr/log/Psr/Log/LoggerAwareTrait.php',
'VendorDHL\\Psr\\Log\\LoggerInterface' => $baseDir . '/vendor_prefixed/psr/log/Psr/Log/LoggerInterface.php',
'VendorDHL\\Psr\\Log\\LoggerTrait' => $baseDir . '/vendor_prefixed/psr/log/Psr/Log/LoggerTrait.php',
'VendorDHL\\Psr\\Log\\NullLogger' => $baseDir . '/vendor_prefixed/psr/log/Psr/Log/NullLogger.php',
'VendorDHL\\Psr\\Log\\Test\\DummyTest' => $baseDir . '/vendor_prefixed/psr/log/Psr/Log/Test/DummyTest.php',
'VendorDHL\\Psr\\Log\\Test\\LoggerInterfaceTest' => $baseDir . '/vendor_prefixed/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
'VendorDHL\\Psr\\Log\\Test\\TestLogger' => $baseDir . '/vendor_prefixed/psr/log/Psr/Log/Test/TestLogger.php',
'VendorDHL\\Psr\\SimpleCache\\CacheException' => $baseDir . '/vendor_prefixed/psr/simple-cache/src/CacheException.php',
'VendorDHL\\Psr\\SimpleCache\\CacheInterface' => $baseDir . '/vendor_prefixed/psr/simple-cache/src/CacheInterface.php',
'VendorDHL\\Psr\\SimpleCache\\InvalidArgumentException' => $baseDir . '/vendor_prefixed/psr/simple-cache/src/InvalidArgumentException.php',
'VendorDHL\\WPDesk\\AbstractShipping\\CollectionPointCapability\\CollectionPointsProvider' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/CollectionPoints/CollectionPointsProvider.php',
'VendorDHL\\WPDesk\\AbstractShipping\\CollectionPoints\\CollectionPoint' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/CollectionPoints/CollectionPoint.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Exception\\ApiConnectionCheckerException' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Exception/ApiConnectionCheckerException.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Exception\\CollectionPointNotFoundException' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Exception/CollectionPointNotFoundException.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Exception\\InvalidSettingsException' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Exception/InvalidSettingsException.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Exception\\RateException' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Exception/RateException.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Exception\\SettingsFieldNotExistsException' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Exception/SettingsFieldNotExistsException.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Exception\\ShippingException' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Exception/ShippingException.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Exception\\UnitConversionException' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Exception/UnitConversionException.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Rate\\Money' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Rate/Money.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Rate\\ShipmentRating' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Rate/ShipmentRating.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Rate\\ShipmentRatingImplementation' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Rate/ShipmentRatingImplementation.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Rate\\SingleRate' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Rate/SingleRate.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Settings\\BlackoutLeadDays' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Settings/BlackoutLeadDays.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Settings\\DefinitionModifier\\SettingsDefinitionModifierAfter' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Settings/DefinitionModifier/SettingsDefinitionModifierAfter.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Settings\\DefinitionModifier\\SettingsDefinitionModifierBefore' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Settings/DefinitionModifier/SettingsDefinitionModifierBefore.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Settings\\SettingsDecorators\\AbstractDecoratorFactory' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Settings/SettingsDecorators/AbstractDecoratorFactory.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Settings\\SettingsDecorators\\BlackoutLeadDaysSettingsDefinitionDecoratorFactory' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Settings/SettingsDecorators/BlackoutLeadDaysSettingsDefinitionDecoratorFactory.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Settings\\SettingsDefinition' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Settings/SettingsDefinition.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Settings\\SettingsValues' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Settings/SettingsValues.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Settings\\SettingsValuesAsArray' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Settings/SettingsValuesAsArray.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Shipment\\Address' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Shipment/Address.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Shipment\\Client' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Shipment/Client.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Shipment\\Dimensions' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Shipment/Dimensions.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Shipment\\Item' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Shipment/Item.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Shipment\\Package' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Shipment/Package.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Shipment\\Shipment' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Shipment/Shipment.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Shipment\\Weight' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Shipment/Weight.php',
'VendorDHL\\WPDesk\\AbstractShipping\\ShippingService' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/ShippingService.php',
'VendorDHL\\WPDesk\\AbstractShipping\\ShippingServiceCapability\\CanInsure' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/ShippingServiceCapability/CanInsure.php',
'VendorDHL\\WPDesk\\AbstractShipping\\ShippingServiceCapability\\CanPack' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/ShippingServiceCapability/CanPack.php',
'VendorDHL\\WPDesk\\AbstractShipping\\ShippingServiceCapability\\CanRate' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/ShippingServiceCapability/CanRate.php',
'VendorDHL\\WPDesk\\AbstractShipping\\ShippingServiceCapability\\CanRateToCollectionPoint' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/ShippingServiceCapability/CanRateToCollectionPoint.php',
'VendorDHL\\WPDesk\\AbstractShipping\\ShippingServiceCapability\\CanReturnDeliveryDate' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/ShippingServiceCapability/CanReturnDeliveryDate.php',
'VendorDHL\\WPDesk\\AbstractShipping\\ShippingServiceCapability\\CanTestSettings' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/ShippingServiceCapability/CanTestSettings.php',
'VendorDHL\\WPDesk\\AbstractShipping\\ShippingServiceCapability\\HasSettings' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/ShippingServiceCapability/HasSettings.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Shop\\ShopSettings' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Shop/ShopSettings.php',
'VendorDHL\\WPDesk\\AbstractShipping\\UnitConversion\\UniversalDimension' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/UnitConversion/UniversalDimension.php',
'VendorDHL\\WPDesk\\AbstractShipping\\UnitConversion\\UniversalWeight' => $baseDir . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/UnitConversion/UniversalWeight.php',
'VendorDHL\\WPDesk\\License\\ActivationForm\\AjaxHandler' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/ActivationForm/AjaxHandler.php',
'VendorDHL\\WPDesk\\License\\ActivationForm\\FormContentRenderer' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/ActivationForm/FormContentRenderer.php',
'VendorDHL\\WPDesk\\License\\ActivationForm\\PluginsPageRenderer' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/ActivationForm/PluginsPageRenderer.php',
'VendorDHL\\WPDesk\\License\\ActivationForm\\Renderer' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/ActivationForm/Renderer.php',
'VendorDHL\\WPDesk\\License\\Changelog\\Filter\\ByVersion' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Changelog/Filter/ByVersion.php',
'VendorDHL\\WPDesk\\License\\Changelog\\Formatter' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Changelog/Formatter.php',
'VendorDHL\\WPDesk\\License\\Changelog\\Parser' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Changelog/Parser.php',
'VendorDHL\\WPDesk\\License\\Changelog\\Parser\\Line' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Changelog/Parser/Line.php',
'VendorDHL\\WPDesk\\License\\InstalledPlugins' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/InstalledPlugins.php',
'VendorDHL\\WPDesk\\License\\LicenseManager' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/LicenseManager.php',
'VendorDHL\\WPDesk\\License\\LicenseServer\\PluginExternalBlocking' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/LicenseServer/PluginExternalBlocking.php',
'VendorDHL\\WPDesk\\License\\LicenseServer\\PluginLicense' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/LicenseServer/PluginLicense.php',
'VendorDHL\\WPDesk\\License\\LicenseServer\\PluginRegistrator' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/LicenseServer/PluginRegistrator.php',
'VendorDHL\\WPDesk\\License\\LicenseServer\\PluginUpgrade' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/LicenseServer/PluginUpgrade.php',
'VendorDHL\\WPDesk\\License\\LicenseServer\\PluginViewVersionInfo' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/LicenseServer/PluginViewVersionInfo.php',
'VendorDHL\\WPDesk\\License\\OldLicenseRegistrator' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/OldLicenseRegistrator.php',
'VendorDHL\\WPDesk\\License\\Page\\Action' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/Action.php',
'VendorDHL\\WPDesk\\License\\Page\\LicensePage' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/LicensePage.php',
'VendorDHL\\WPDesk\\License\\Page\\LicensePageActions' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/LicensePageActions.php',
'VendorDHL\\WPDesk\\License\\Page\\License\\Action\\AbstractAction' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/License/Action/AbstractAction.php',
'VendorDHL\\WPDesk\\License\\Page\\License\\Action\\ActionError' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/License/Action/ActionError.php',
'VendorDHL\\WPDesk\\License\\Page\\License\\Action\\LicenseActivation' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/License/Action/LicenseActivation.php',
'VendorDHL\\WPDesk\\License\\Page\\License\\Action\\LicenseDeactivation' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/License/Action/LicenseDeactivation.php',
'VendorDHL\\WPDesk\\License\\Page\\License\\Action\\Nothing' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/License/Action/Nothing.php',
'VendorDHL\\WPDesk\\License\\PluginLicense' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/PluginLicense.php',
'VendorDHL\\WPDesk\\License\\PluginRegistrator' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/PluginRegistrator.php',
'VendorDHL\\WPDesk\\License\\PluginRegistratorInterface' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/PluginRegistratorInterface.php',
'VendorDHL\\WPDesk\\License\\ServerAddressRepository' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/ServerAddressRepository.php',
'VendorDHL\\WPDesk\\License\\WpUpgrader\\SubscriptionHandler' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/WpUpgrader/SubscriptionHandler.php',
'VendorDHL\\WPDesk\\Logger\\BasicLoggerFactory' => $baseDir . '/vendor_prefixed/wpdesk/wp-logs/src/BasicLoggerFactory.php',
'VendorDHL\\WPDesk\\Logger\\LoggerFacade' => $baseDir . '/vendor_prefixed/wpdesk/wp-logs/src/LoggerFacade.php',
'VendorDHL\\WPDesk\\Logger\\LoggerFactory' => $baseDir . '/vendor_prefixed/wpdesk/wp-logs/src/LoggerFactory.php',
'VendorDHL\\WPDesk\\Logger\\Settings' => $baseDir . '/vendor_prefixed/wpdesk/wp-logs/src/Settings.php',
'VendorDHL\\WPDesk\\Logger\\SimpleLoggerFactory' => $baseDir . '/vendor_prefixed/wpdesk/wp-logs/src/SimpleLoggerFactory.php',
'VendorDHL\\WPDesk\\Logger\\WC\\Exception\\WCLoggerAlreadyCaptured' => $baseDir . '/vendor_prefixed/wpdesk/wp-logs/src/WC/Exception/WCLoggerAlreadyCaptured.php',
'VendorDHL\\WPDesk\\Logger\\WC\\WooCommerceCapture' => $baseDir . '/vendor_prefixed/wpdesk/wp-logs/src/WC/WooCommerceCapture.php',
'VendorDHL\\WPDesk\\Logger\\WC\\WooCommerceHandler' => $baseDir . '/vendor_prefixed/wpdesk/wp-logs/src/WC/WooCommerceHandler.php',
'VendorDHL\\WPDesk\\Logger\\WC\\WooCommerceMonologPlugin' => $baseDir . '/vendor_prefixed/wpdesk/wp-logs/src/WC/WooCommerceMonologPlugin.php',
'VendorDHL\\WPDesk\\Logger\\WPDeskLoggerFactory' => $baseDir . '/vendor_prefixed/wpdesk/wp-logs/src/WPDeskLoggerFactory.php',
'VendorDHL\\WPDesk\\Logger\\WP\\WPCapture' => $baseDir . '/vendor_prefixed/wpdesk/wp-logs/src/WP/WPCapture.php',
'VendorDHL\\WPDesk\\Notice\\AjaxHandler' => $baseDir . '/vendor_prefixed/wpdesk/wp-notice/src/WPDesk/Notice/AjaxHandler.php',
'VendorDHL\\WPDesk\\Notice\\Factory' => $baseDir . '/vendor_prefixed/wpdesk/wp-notice/src/WPDesk/Notice/Factory.php',
'VendorDHL\\WPDesk\\Notice\\Notice' => $baseDir . '/vendor_prefixed/wpdesk/wp-notice/src/WPDesk/Notice/Notice.php',
'VendorDHL\\WPDesk\\Notice\\PermanentDismissibleNotice' => $baseDir . '/vendor_prefixed/wpdesk/wp-notice/src/WPDesk/Notice/PermanentDismissibleNotice.php',
'VendorDHL\\WPDesk\\PluginBuilder\\BuildDirector\\LegacyBuildDirector' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/BuildDirector/LegacyBuildDirector.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Builder\\AbstractBuilder' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Builder/AbstractBuilder.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Builder\\InfoActivationBuilder' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Builder/InfoActivationBuilder.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Builder\\InfoBuilder' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Builder/InfoBuilder.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\AbstractPlugin' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/AbstractPlugin.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\Activateable' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/Activateable.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\ActivationAware' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/ActivationAware.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\ActivationTracker' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/ActivationTracker.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\Conditional' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/Conditional.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\Deactivateable' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/Deactivateable.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\Hookable' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/Hookable.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\HookableCollection' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/HookableCollection.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\HookableParent' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/HookableParent.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\HookablePluginDependant' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/HookablePluginDependant.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\PluginAccess' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/PluginAccess.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\SlimPlugin' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/SlimPlugin.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\TemplateLoad' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/TemplateLoad.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Storage\\Exception\\ClassAlreadyExists' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Storage/Exception/ClassAlreadyExists.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Storage\\Exception\\ClassNotExists' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Storage/Exception/ClassNotExists.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Storage\\PluginStorage' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Storage/PluginStorage.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Storage\\StaticStorage' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Storage/StaticStorage.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Storage\\StorageFactory' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Storage/StorageFactory.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Storage\\WordpressFilterStorage' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Storage/WordpressFilterStorage.php',
'VendorDHL\\WPDesk\\Plugin\\Flow\\Initialization\\BuilderTrait' => $baseDir . '/vendor_prefixed/wpdesk/wp-plugin-flow-common/src/Initialization/BuilderTrait.php',
'VendorDHL\\WPDesk\\Plugin\\Flow\\Initialization\\InitializationFactory' => $baseDir . '/vendor_prefixed/wpdesk/wp-plugin-flow-common/src/Initialization/InitializationFactory.php',
'VendorDHL\\WPDesk\\Plugin\\Flow\\Initialization\\InitializationStrategy' => $baseDir . '/vendor_prefixed/wpdesk/wp-plugin-flow-common/src/Initialization/InitializationStrategy.php',
'VendorDHL\\WPDesk\\Plugin\\Flow\\Initialization\\PluginDisablerByFileTrait' => $baseDir . '/vendor_prefixed/wpdesk/wp-plugin-flow-common/src/Initialization/PluginDisablerByFileTrait.php',
'VendorDHL\\WPDesk\\Plugin\\Flow\\Initialization\\Simple\\SimpleFactory' => $baseDir . '/vendor_prefixed/wpdesk/wp-plugin-flow-common/src/Initialization/Simple/SimpleFactory.php',
'VendorDHL\\WPDesk\\Plugin\\Flow\\Initialization\\Simple\\SimpleFreeStrategy' => $baseDir . '/vendor_prefixed/wpdesk/wp-plugin-flow-common/src/Initialization/Simple/SimpleFreeStrategy.php',
'VendorDHL\\WPDesk\\Plugin\\Flow\\Initialization\\Simple\\SimplePaidStrategy' => $baseDir . '/vendor_prefixed/wpdesk/wp-plugin-flow-common/src/Initialization/Simple/SimplePaidStrategy.php',
'VendorDHL\\WPDesk\\Plugin\\Flow\\Initialization\\Simple\\TrackerInstanceAsFilterTrait' => $baseDir . '/vendor_prefixed/wpdesk/wp-plugin-flow-common/src/Initialization/TrackerInstanceAsFilterTrait.php',
'VendorDHL\\WPDesk\\Plugin\\Flow\\PluginBootstrap' => $baseDir . '/vendor_prefixed/wpdesk/wp-plugin-flow-common/src/PluginBootstrap.php',
'VendorDHL\\WPDesk\\SOAP\\SoapClientWithLogger' => $baseDir . '/vendor_prefixed/wpdesk/soap-client-with-logger/src/SOAP/SoapClientWithLogger.php',
'VendorDHL\\WPDesk\\Tracker\\Assets' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/Assets.php',
'VendorDHL\\WPDesk\\Tracker\\Deactivation\\AjaxDeactivationDataHandler' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/AjaxDeactivationDataHandler.php',
'VendorDHL\\WPDesk\\Tracker\\Deactivation\\DeactivationContent' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/DeactivationContent.php',
'VendorDHL\\WPDesk\\Tracker\\Deactivation\\PluginData' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/PluginData.php',
'VendorDHL\\WPDesk\\Tracker\\Deactivation\\Scripts' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/Scripts.php',
'VendorDHL\\WPDesk\\Tracker\\Deactivation\\Thickbox' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/Thickbox.php',
'VendorDHL\\WPDesk\\Tracker\\Deactivation\\Tracker' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/Tracker.php',
'VendorDHL\\WPDesk\\Tracker\\Deactivation\\TrackerFactory' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/TrackerFactory.php',
'VendorDHL\\WPDesk\\Tracker\\OptInOptOut' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/OptInOptOut.php',
'VendorDHL\\WPDesk\\Tracker\\OptInPage' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/OptInPage.php',
'VendorDHL\\WPDesk\\Tracker\\OptOut' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/OptOut.php',
'VendorDHL\\WPDesk\\Tracker\\PluginActionLinks' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/PluginActionLinks.php',
'VendorDHL\\WPDesk\\Tracker\\Shop' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/Shop.php',
'VendorDHL\\WPDesk\\View\\PluginViewBuilder' => $baseDir . '/vendor_prefixed/wpdesk/wp-view/src/PluginViewBuilder.php',
'VendorDHL\\WPDesk\\View\\Renderer\\LoadTemplatePlugin' => $baseDir . '/vendor_prefixed/wpdesk/wp-view/src/Renderer/LoadTemplatePlugin.php',
'VendorDHL\\WPDesk\\View\\Renderer\\Renderer' => $baseDir . '/vendor_prefixed/wpdesk/wp-view/src/Renderer/Renderer.php',
'VendorDHL\\WPDesk\\View\\Renderer\\SimplePhpRenderer' => $baseDir . '/vendor_prefixed/wpdesk/wp-view/src/Renderer/SimplePhpRenderer.php',
'VendorDHL\\WPDesk\\View\\Resolver\\ChainResolver' => $baseDir . '/vendor_prefixed/wpdesk/wp-view/src/Resolver/ChainResolver.php',
'VendorDHL\\WPDesk\\View\\Resolver\\DirResolver' => $baseDir . '/vendor_prefixed/wpdesk/wp-view/src/Resolver/DirResolver.php',
'VendorDHL\\WPDesk\\View\\Resolver\\Exception\\CanNotResolve' => $baseDir . '/vendor_prefixed/wpdesk/wp-view/src/Resolver/Exception/CanNotResolve.php',
'VendorDHL\\WPDesk\\View\\Resolver\\NullResolver' => $baseDir . '/vendor_prefixed/wpdesk/wp-view/src/Resolver/NullResolver.php',
'VendorDHL\\WPDesk\\View\\Resolver\\Resolver' => $baseDir . '/vendor_prefixed/wpdesk/wp-view/src/Resolver/Resolver.php',
'VendorDHL\\WPDesk\\View\\Resolver\\WPThemeResolver' => $baseDir . '/vendor_prefixed/wpdesk/wp-view/src/Resolver/WPThemeResolver.php',
'VendorDHL\\WPDesk\\WooCommerceShippingMethod\\Field\\ApiConnectionStatus\\ApiConnectionRenderer' => $baseDir . '/vendor_prefixed/wpdesk/wp-woocommerce-shipping-method/src/Field/ApiConnectionStatus/ApiConnectionRenderer.php',
'VendorDHL\\WPDesk\\WooCommerceShippingMethod\\Field\\ApiConnectionStatus\\ApiConnectionStatus' => $baseDir . '/vendor_prefixed/wpdesk/wp-woocommerce-shipping-method/src/Field/ApiConnectionStatus/ApiConnectionStatus.php',
'VendorDHL\\WPDesk\\WooCommerceShippingMethod\\Field\\ApiConnectionStatus\\ApiConnectionStatusAjax' => $baseDir . '/vendor_prefixed/wpdesk/wp-woocommerce-shipping-method/src/Field/ApiConnectionStatus/ApiConnectionStatusAjax.php',
'VendorDHL\\WPDesk\\WooCommerceShippingMethod\\Field\\ApiConnectionStatus\\HasApiConnectionStatusField' => $baseDir . '/vendor_prefixed/wpdesk/wp-woocommerce-shipping-method/src/Field/ApiConnectionStatus/HasApiConnectionStatusField.php',
'VendorDHL\\WPDesk_API_KEY' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/ApiManager/class-wc-key-api.php',
'VendorDHL\\WPDesk_API_MENU' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/ApiManager/class-wc-api-manager-menu.php',
'VendorDHL\\WPDesk_API_Manager_With_Update_Flag' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/ApiManager/class-wc-api-manager.php',
'VendorDHL\\WPDesk_API_Password_Management' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/ApiManager/class-wc-api-manager-passwords.php',
'VendorDHL\\WPDesk_Basic_Requirement_Checker' => $baseDir . '/vendor_prefixed/wpdesk/wp-basic-requirements/src/Basic_Requirement_Checker.php',
'VendorDHL\\WPDesk_Basic_Requirement_Checker_Factory' => $baseDir . '/vendor_prefixed/wpdesk/wp-basic-requirements/src/Basic_Requirement_Checker_Factory.php',
'VendorDHL\\WPDesk_Basic_Requirement_Checker_With_Update_Disable' => $baseDir . '/vendor_prefixed/wpdesk/wp-basic-requirements/src/Basic_Requirement_Checker_With_Update_Disable.php',
'VendorDHL\\WPDesk_Buildable' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Buildable.php',
'VendorDHL\\WPDesk_Has_Plugin_Info' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Has_Plugin_Info.php',
'VendorDHL\\WPDesk_Helper_List_Table' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/License/views/class-wpdesk-helper-list-table.php',
'VendorDHL\\WPDesk_Logger' => $baseDir . '/vendor_prefixed/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php',
'VendorDHL\\WPDesk_Logger_Factory' => $baseDir . '/vendor_prefixed/wpdesk/wp-logs/src/deprecated/wpdesk-logger-factory.php',
'VendorDHL\\WPDesk_Plugin_Info' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Plugin_Info.php',
'VendorDHL\\WPDesk_Requirement_Checker' => $baseDir . '/vendor_prefixed/wpdesk/wp-basic-requirements/src/Requirement_Checker.php',
'VendorDHL\\WPDesk_Requirement_Checker_Factory' => $baseDir . '/vendor_prefixed/wpdesk/wp-basic-requirements/src/Requirement_Checker_Factory.php',
'VendorDHL\\WPDesk_Tracker' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/class-wpdesk-tracker.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Gateways' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-gateways.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Identification' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-identification.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Identification_Gdpr' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-identification-gdpr.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Jetpack' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-jetpack.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_License_Emails' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-license-emails.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Orders' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-orders.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Orders_Country' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-orders-country.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Orders_Month' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-orders-month.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Plugins' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-plugins.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Products' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-products.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Products_Variations' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-products-variations.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Server' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-server.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Settings' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-settings.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Shipping_Classes' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-shipping-classes.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Shipping_Methods' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-shipping-methods.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Shipping_Methods_Zones' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-shipping-methods-zones.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Templates' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-templates.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Theme' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-theme.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_User_Agent' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-user-agent.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Users' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-users.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Wordpress' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-wordpress.php',
'VendorDHL\\WPDesk_Tracker_Factory_Prefixed' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/class-wpdesk-tracker-factory-prefixed.php',
'VendorDHL\\WPDesk_Tracker_Interface' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/class-wpdesk-tracker-interface.php',
'VendorDHL\\WPDesk_Tracker_Persistence_Consent' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/persistence/class-wpdesk-tracker-persistence-consent.php',
'VendorDHL\\WPDesk_Tracker_Sender' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/sender/class-wpdesk-tracker-sender.php',
'VendorDHL\\WPDesk_Tracker_Sender_Exception_WpError' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/sender/Exception/class-wpdesk-tracker-sender-exception-wperror.php',
'VendorDHL\\WPDesk_Tracker_Sender_Logged' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/sender/class-wpdesk-tracker-sender-logged.php',
'VendorDHL\\WPDesk_Tracker_Sender_Wordpress_To_WPDesk' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/sender/class-wpdesk-tracker-sender-wordpress-to-wpdesk.php',
'VendorDHL\\WPDesk_Translable' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Translable.php',
'VendorDHL\\WPDesk_Translatable' => $baseDir . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Translatable.php',
'VendorDHL\\WPDesk_Update_API_Check' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/ApiManager/class-wc-plugin-update.php',
'WPDesk\\DHL\\ApiConnectionStatusAjax' => $baseDir . '/src/WPDesk/DHL/ApiConnectionStatusAjax.php',
'WPDesk\\DHL\\Exceptions\\ApiConnectionStatusException' => $baseDir . '/src/WPDesk/DHL/Exceptions/ApiConnectionStatusException.php',
'WPDesk\\DHL\\HelperTrait' => $baseDir . '/src/WPDesk/DHL/HelperTrait.php',
'WPDesk\\DHL\\Parcelshop\\CheckoutValidator' => $baseDir . '/src/WPDesk/DHL/Parcelshop/CheckoutValidator.php',
'WPDesk\\DHL\\SanitizeTrait' => $baseDir . '/src/WPDesk/DHL/SanitizeTrait.php',
'WPDesk\\Helper\\HelperAsLibrary' => $vendorDir . '/wpdesk/wp-wpdesk-helper-override/src/Helper/HelperAsLibrary.php',
'WPDesk_Can_Manage_DHL_Weight' => $baseDir . '/classes/class-can-manage-weight.php',
'WPDesk_Flexible_Shipping_Manifest_dhl' => $baseDir . '/classes/class-flexible-shipping-manifest.php',
'WPDesk_Flexible_Shipping_Shipment_dhl' => $baseDir . '/classes/class-flexible-shipping-shipment.php',
'WPDesk_Tracker_Data_Provider' => $vendorDir . '/wpdesk/wp-wpdesk-helper-override/src/Interop/Tracker/class-wpdesk-tracker-data-provider.php',
'WPDesk_Tracker_Factory' => $vendorDir . '/wpdesk/wp-wpdesk-helper-override/src/Helper/TrackerFactory.php',
'WPDesk_Tracker_Interface' => $vendorDir . '/wpdesk/wp-wpdesk-helper-override/src/Interop/Tracker/class-wpdesk-tracker-interface.php',
'WPDesk_Tracker_Sender' => $vendorDir . '/wpdesk/wp-wpdesk-helper-override/src/Interop/Tracker/class-wpdesk-tracker-sender.php',
'WPDesk_WooCommerce_DHL' => $baseDir . '/classes/class-woocommerce-dhl.php',
'WPDesk_WooCommerce_DHL_API' => $baseDir . '/classes/class-dhl-api.php',
'WPDesk_WooCommerce_DHL_Ajax_Request' => $baseDir . '/classes/class-ajax-request.php',
'WPDesk_WooCommerce_DHL_FS_Hooks' => $baseDir . '/classes/class-flexible-shipping-hooks.php',
'WPDesk_WooCommerce_DHL_Flexible_Printing_Integration' => $baseDir . '/classes/class-flexible-printing-integration.php',
'WPDesk_WooCommerce_DHL_Invalid_Address_Exception' => $baseDir . '/classes/class-exception-invalid-adress.php',
'WPDesk_WooCommerce_DHL_Parcelshop_API' => $baseDir . '/classes/class-dhl-parcelshop-api.php',
'WPDesk_WooCommerce_DHL_Select_Parcels_Via_Ajax' => $baseDir . '/classes/class-search-parcel-via-ajax.php',
'WPDesk_WooCommerce_DHL_Shipping_Method' => $baseDir . '/classes/class-shipping-method.php',
'WooCommerce_DHL_Plugin' => $baseDir . '/classes/class-woocommerce-dhl-plugin.php',
);

View File

@@ -0,0 +1,9 @@
<?php
// autoload_namespaces.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
);

View File

@@ -0,0 +1,10 @@
<?php
// autoload_psr4.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'WPDesk\\DHL\\' => array($baseDir . '/src/WPDesk/DHL'),
);

View File

@@ -0,0 +1,38 @@
<?php
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitd27e5075b40a04be2431bf30932aa2cd
{
private static $loader;
public static function loadClassLoader($class)
{
if ('Composer\Autoload\ClassLoader' === $class) {
require __DIR__ . '/ClassLoader.php';
}
}
/**
* @return \Composer\Autoload\ClassLoader
*/
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInitd27e5075b40a04be2431bf30932aa2cd', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitd27e5075b40a04be2431bf30932aa2cd', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitd27e5075b40a04be2431bf30932aa2cd::getInitializer($loader));
$loader->register(true);
return $loader;
}
}

View File

@@ -0,0 +1,396 @@
<?php
// autoload_static.php @generated by Composer
namespace Composer\Autoload;
class ComposerStaticInitd27e5075b40a04be2431bf30932aa2cd
{
public static $prefixLengthsPsr4 = array (
'W' =>
array (
'WPDesk\\DHL\\' => 11,
),
);
public static $prefixDirsPsr4 = array (
'WPDesk\\DHL\\' =>
array (
0 => __DIR__ . '/../..' . '/src/WPDesk/DHL',
),
);
public static $classMap = array (
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'VendorDHL\\Monolog\\ErrorHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/ErrorHandler.php',
'VendorDHL\\Monolog\\Formatter\\ChromePHPFormatter' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php',
'VendorDHL\\Monolog\\Formatter\\ElasticaFormatter' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php',
'VendorDHL\\Monolog\\Formatter\\FlowdockFormatter' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php',
'VendorDHL\\Monolog\\Formatter\\FluentdFormatter' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php',
'VendorDHL\\Monolog\\Formatter\\FormatterInterface' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php',
'VendorDHL\\Monolog\\Formatter\\GelfMessageFormatter' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php',
'VendorDHL\\Monolog\\Formatter\\HtmlFormatter' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php',
'VendorDHL\\Monolog\\Formatter\\JsonFormatter' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php',
'VendorDHL\\Monolog\\Formatter\\LineFormatter' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/LineFormatter.php',
'VendorDHL\\Monolog\\Formatter\\LogglyFormatter' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php',
'VendorDHL\\Monolog\\Formatter\\LogstashFormatter' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php',
'VendorDHL\\Monolog\\Formatter\\MongoDBFormatter' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php',
'VendorDHL\\Monolog\\Formatter\\NormalizerFormatter' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php',
'VendorDHL\\Monolog\\Formatter\\ScalarFormatter' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php',
'VendorDHL\\Monolog\\Formatter\\WildfireFormatter' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php',
'VendorDHL\\Monolog\\Handler\\AbstractHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/AbstractHandler.php',
'VendorDHL\\Monolog\\Handler\\AbstractProcessingHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php',
'VendorDHL\\Monolog\\Handler\\AbstractSyslogHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php',
'VendorDHL\\Monolog\\Handler\\AmqpHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/AmqpHandler.php',
'VendorDHL\\Monolog\\Handler\\BrowserConsoleHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php',
'VendorDHL\\Monolog\\Handler\\BufferHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/BufferHandler.php',
'VendorDHL\\Monolog\\Handler\\ChromePHPHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php',
'VendorDHL\\Monolog\\Handler\\CouchDBHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php',
'VendorDHL\\Monolog\\Handler\\CubeHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/CubeHandler.php',
'VendorDHL\\Monolog\\Handler\\Curl\\Util' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/Curl/Util.php',
'VendorDHL\\Monolog\\Handler\\DeduplicationHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php',
'VendorDHL\\Monolog\\Handler\\DoctrineCouchDBHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php',
'VendorDHL\\Monolog\\Handler\\DynamoDbHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php',
'VendorDHL\\Monolog\\Handler\\ElasticSearchHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php',
'VendorDHL\\Monolog\\Handler\\ErrorLogHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php',
'VendorDHL\\Monolog\\Handler\\FilterHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FilterHandler.php',
'VendorDHL\\Monolog\\Handler\\FingersCrossedHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php',
'VendorDHL\\Monolog\\Handler\\FingersCrossed\\ActivationStrategyInterface' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php',
'VendorDHL\\Monolog\\Handler\\FingersCrossed\\ChannelLevelActivationStrategy' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php',
'VendorDHL\\Monolog\\Handler\\FingersCrossed\\ErrorLevelActivationStrategy' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php',
'VendorDHL\\Monolog\\Handler\\FirePHPHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php',
'VendorDHL\\Monolog\\Handler\\FleepHookHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php',
'VendorDHL\\Monolog\\Handler\\FlowdockHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php',
'VendorDHL\\Monolog\\Handler\\FormattableHandlerInterface' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php',
'VendorDHL\\Monolog\\Handler\\FormattableHandlerTrait' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php',
'VendorDHL\\Monolog\\Handler\\GelfHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/GelfHandler.php',
'VendorDHL\\Monolog\\Handler\\GroupHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/GroupHandler.php',
'VendorDHL\\Monolog\\Handler\\HandlerInterface' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/HandlerInterface.php',
'VendorDHL\\Monolog\\Handler\\HandlerWrapper' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php',
'VendorDHL\\Monolog\\Handler\\HipChatHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/HipChatHandler.php',
'VendorDHL\\Monolog\\Handler\\IFTTTHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php',
'VendorDHL\\Monolog\\Handler\\InsightOpsHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php',
'VendorDHL\\Monolog\\Handler\\LogEntriesHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php',
'VendorDHL\\Monolog\\Handler\\LogglyHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/LogglyHandler.php',
'VendorDHL\\Monolog\\Handler\\MailHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/MailHandler.php',
'VendorDHL\\Monolog\\Handler\\MandrillHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/MandrillHandler.php',
'VendorDHL\\Monolog\\Handler\\MissingExtensionException' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php',
'VendorDHL\\Monolog\\Handler\\MongoDBHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php',
'VendorDHL\\Monolog\\Handler\\NativeMailerHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php',
'VendorDHL\\Monolog\\Handler\\NewRelicHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php',
'VendorDHL\\Monolog\\Handler\\NullHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/NullHandler.php',
'VendorDHL\\Monolog\\Handler\\PHPConsoleHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php',
'VendorDHL\\Monolog\\Handler\\ProcessableHandlerInterface' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php',
'VendorDHL\\Monolog\\Handler\\ProcessableHandlerTrait' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php',
'VendorDHL\\Monolog\\Handler\\PsrHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/PsrHandler.php',
'VendorDHL\\Monolog\\Handler\\PushoverHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/PushoverHandler.php',
'VendorDHL\\Monolog\\Handler\\RavenHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RavenHandler.php',
'VendorDHL\\Monolog\\Handler\\RedisHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RedisHandler.php',
'VendorDHL\\Monolog\\Handler\\RollbarHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RollbarHandler.php',
'VendorDHL\\Monolog\\Handler\\RotatingFileHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php',
'VendorDHL\\Monolog\\Handler\\SamplingHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SamplingHandler.php',
'VendorDHL\\Monolog\\Handler\\SlackHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SlackHandler.php',
'VendorDHL\\Monolog\\Handler\\SlackWebhookHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php',
'VendorDHL\\Monolog\\Handler\\Slack\\SlackRecord' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php',
'VendorDHL\\Monolog\\Handler\\SlackbotHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SlackbotHandler.php',
'VendorDHL\\Monolog\\Handler\\SocketHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SocketHandler.php',
'VendorDHL\\Monolog\\Handler\\StreamHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/StreamHandler.php',
'VendorDHL\\Monolog\\Handler\\SwiftMailerHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php',
'VendorDHL\\Monolog\\Handler\\SyslogHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SyslogHandler.php',
'VendorDHL\\Monolog\\Handler\\SyslogUdpHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php',
'VendorDHL\\Monolog\\Handler\\SyslogUdp\\UdpSocket' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php',
'VendorDHL\\Monolog\\Handler\\TestHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/TestHandler.php',
'VendorDHL\\Monolog\\Handler\\WhatFailureGroupHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php',
'VendorDHL\\Monolog\\Handler\\ZendMonitorHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php',
'VendorDHL\\Monolog\\Logger' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Logger.php',
'VendorDHL\\Monolog\\Processor\\GitProcessor' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Processor/GitProcessor.php',
'VendorDHL\\Monolog\\Processor\\IntrospectionProcessor' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php',
'VendorDHL\\Monolog\\Processor\\MemoryPeakUsageProcessor' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php',
'VendorDHL\\Monolog\\Processor\\MemoryProcessor' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php',
'VendorDHL\\Monolog\\Processor\\MemoryUsageProcessor' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php',
'VendorDHL\\Monolog\\Processor\\MercurialProcessor' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php',
'VendorDHL\\Monolog\\Processor\\ProcessIdProcessor' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php',
'VendorDHL\\Monolog\\Processor\\ProcessorInterface' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php',
'VendorDHL\\Monolog\\Processor\\PsrLogMessageProcessor' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php',
'VendorDHL\\Monolog\\Processor\\TagProcessor' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Processor/TagProcessor.php',
'VendorDHL\\Monolog\\Processor\\UidProcessor' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Processor/UidProcessor.php',
'VendorDHL\\Monolog\\Processor\\WebProcessor' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Processor/WebProcessor.php',
'VendorDHL\\Monolog\\Registry' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Registry.php',
'VendorDHL\\Monolog\\ResettableInterface' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/ResettableInterface.php',
'VendorDHL\\Monolog\\SignalHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/SignalHandler.php',
'VendorDHL\\Monolog\\Utils' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Utils.php',
'VendorDHL\\Octolize\\Tracker\\OptInNotice\\OptInNotice' => __DIR__ . '/../..' . '/vendor_prefixed/octolize/wp-octolize-tracker/src/OptInNotice/OptInNotice.php',
'VendorDHL\\Octolize\\Tracker\\OptInNotice\\ShouldDisplay' => __DIR__ . '/../..' . '/vendor_prefixed/octolize/wp-octolize-tracker/src/OptInNotice/ShouldDisplay.php',
'VendorDHL\\Octolize\\Tracker\\OptInNotice\\ShouldDisplayAlways' => __DIR__ . '/../..' . '/vendor_prefixed/octolize/wp-octolize-tracker/src/OptInNotice/ShouldDisplayAlways.php',
'VendorDHL\\Octolize\\Tracker\\OptInNotice\\ShouldDisplayAndConditions' => __DIR__ . '/../..' . '/vendor_prefixed/octolize/wp-octolize-tracker/src/OptInNotice/ShouldDisplayAndConditions.php',
'VendorDHL\\Octolize\\Tracker\\OptInNotice\\ShouldDisplayGetParameterPresent' => __DIR__ . '/../..' . '/vendor_prefixed/octolize/wp-octolize-tracker/src/OptInNotice/ShouldDisplayGetParameterPresent.php',
'VendorDHL\\Octolize\\Tracker\\OptInNotice\\ShouldDisplayGetParameterValue' => __DIR__ . '/../..' . '/vendor_prefixed/octolize/wp-octolize-tracker/src/OptInNotice/ShouldDisplayGetParameterValue.php',
'VendorDHL\\Octolize\\Tracker\\OptInNotice\\ShouldDisplayNever' => __DIR__ . '/../..' . '/vendor_prefixed/octolize/wp-octolize-tracker/src/OptInNotice/ShouldDisplayNever.php',
'VendorDHL\\Octolize\\Tracker\\OptInNotice\\ShouldDisplayOrConditions' => __DIR__ . '/../..' . '/vendor_prefixed/octolize/wp-octolize-tracker/src/OptInNotice/ShouldDisplayOrConditions.php',
'VendorDHL\\Octolize\\Tracker\\OptInNotice\\ShouldDisplayShippingMethodInstanceSettings' => __DIR__ . '/../..' . '/vendor_prefixed/octolize/wp-octolize-tracker/src/OptInNotice/ShouldDisplayShippingMethodInstanceSettings.php',
'VendorDHL\\Octolize\\Tracker\\SenderRegistrator' => __DIR__ . '/../..' . '/vendor_prefixed/octolize/wp-octolize-tracker/src/SenderRegistrator.php',
'VendorDHL\\Octolize\\Tracker\\SenderToOctolize' => __DIR__ . '/../..' . '/vendor_prefixed/octolize/wp-octolize-tracker/src/SenderToOctolize.php',
'VendorDHL\\Octolize\\Tracker\\TrackerInitializer' => __DIR__ . '/../..' . '/vendor_prefixed/octolize/wp-octolize-tracker/src/TrackerInitializer.php',
'VendorDHL\\Psr\\Container\\ContainerExceptionInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/container/src/ContainerExceptionInterface.php',
'VendorDHL\\Psr\\Container\\ContainerInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/container/src/ContainerInterface.php',
'VendorDHL\\Psr\\Container\\NotFoundExceptionInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/container/src/NotFoundExceptionInterface.php',
'VendorDHL\\Psr\\EventDispatcher\\EventDispatcherInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/event-dispatcher/src/EventDispatcherInterface.php',
'VendorDHL\\Psr\\EventDispatcher\\ListenerProviderInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/event-dispatcher/src/ListenerProviderInterface.php',
'VendorDHL\\Psr\\EventDispatcher\\StoppableEventInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/event-dispatcher/src/StoppableEventInterface.php',
'VendorDHL\\Psr\\Http\\Client\\ClientExceptionInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-client/src/ClientExceptionInterface.php',
'VendorDHL\\Psr\\Http\\Client\\ClientInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-client/src/ClientInterface.php',
'VendorDHL\\Psr\\Http\\Client\\NetworkExceptionInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-client/src/NetworkExceptionInterface.php',
'VendorDHL\\Psr\\Http\\Client\\RequestExceptionInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-client/src/RequestExceptionInterface.php',
'VendorDHL\\Psr\\Http\\Message\\MessageInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-message/src/MessageInterface.php',
'VendorDHL\\Psr\\Http\\Message\\RequestFactoryInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-factory/src/RequestFactoryInterface.php',
'VendorDHL\\Psr\\Http\\Message\\RequestInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-message/src/RequestInterface.php',
'VendorDHL\\Psr\\Http\\Message\\ResponseFactoryInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-factory/src/ResponseFactoryInterface.php',
'VendorDHL\\Psr\\Http\\Message\\ResponseInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-message/src/ResponseInterface.php',
'VendorDHL\\Psr\\Http\\Message\\ServerRequestFactoryInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-factory/src/ServerRequestFactoryInterface.php',
'VendorDHL\\Psr\\Http\\Message\\ServerRequestInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-message/src/ServerRequestInterface.php',
'VendorDHL\\Psr\\Http\\Message\\StreamFactoryInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-factory/src/StreamFactoryInterface.php',
'VendorDHL\\Psr\\Http\\Message\\StreamInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-message/src/StreamInterface.php',
'VendorDHL\\Psr\\Http\\Message\\UploadedFileFactoryInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-factory/src/UploadedFileFactoryInterface.php',
'VendorDHL\\Psr\\Http\\Message\\UploadedFileInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-message/src/UploadedFileInterface.php',
'VendorDHL\\Psr\\Http\\Message\\UriFactoryInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-factory/src/UriFactoryInterface.php',
'VendorDHL\\Psr\\Http\\Message\\UriInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-message/src/UriInterface.php',
'VendorDHL\\Psr\\Log\\AbstractLogger' => __DIR__ . '/../..' . '/vendor_prefixed/psr/log/Psr/Log/AbstractLogger.php',
'VendorDHL\\Psr\\Log\\InvalidArgumentException' => __DIR__ . '/../..' . '/vendor_prefixed/psr/log/Psr/Log/InvalidArgumentException.php',
'VendorDHL\\Psr\\Log\\LogLevel' => __DIR__ . '/../..' . '/vendor_prefixed/psr/log/Psr/Log/LogLevel.php',
'VendorDHL\\Psr\\Log\\LoggerAwareInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/log/Psr/Log/LoggerAwareInterface.php',
'VendorDHL\\Psr\\Log\\LoggerAwareTrait' => __DIR__ . '/../..' . '/vendor_prefixed/psr/log/Psr/Log/LoggerAwareTrait.php',
'VendorDHL\\Psr\\Log\\LoggerInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/log/Psr/Log/LoggerInterface.php',
'VendorDHL\\Psr\\Log\\LoggerTrait' => __DIR__ . '/../..' . '/vendor_prefixed/psr/log/Psr/Log/LoggerTrait.php',
'VendorDHL\\Psr\\Log\\NullLogger' => __DIR__ . '/../..' . '/vendor_prefixed/psr/log/Psr/Log/NullLogger.php',
'VendorDHL\\Psr\\Log\\Test\\DummyTest' => __DIR__ . '/../..' . '/vendor_prefixed/psr/log/Psr/Log/Test/DummyTest.php',
'VendorDHL\\Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/../..' . '/vendor_prefixed/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
'VendorDHL\\Psr\\Log\\Test\\TestLogger' => __DIR__ . '/../..' . '/vendor_prefixed/psr/log/Psr/Log/Test/TestLogger.php',
'VendorDHL\\Psr\\SimpleCache\\CacheException' => __DIR__ . '/../..' . '/vendor_prefixed/psr/simple-cache/src/CacheException.php',
'VendorDHL\\Psr\\SimpleCache\\CacheInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/simple-cache/src/CacheInterface.php',
'VendorDHL\\Psr\\SimpleCache\\InvalidArgumentException' => __DIR__ . '/../..' . '/vendor_prefixed/psr/simple-cache/src/InvalidArgumentException.php',
'VendorDHL\\WPDesk\\AbstractShipping\\CollectionPointCapability\\CollectionPointsProvider' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/CollectionPoints/CollectionPointsProvider.php',
'VendorDHL\\WPDesk\\AbstractShipping\\CollectionPoints\\CollectionPoint' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/CollectionPoints/CollectionPoint.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Exception\\ApiConnectionCheckerException' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Exception/ApiConnectionCheckerException.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Exception\\CollectionPointNotFoundException' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Exception/CollectionPointNotFoundException.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Exception\\InvalidSettingsException' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Exception/InvalidSettingsException.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Exception\\RateException' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Exception/RateException.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Exception\\SettingsFieldNotExistsException' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Exception/SettingsFieldNotExistsException.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Exception\\ShippingException' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Exception/ShippingException.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Exception\\UnitConversionException' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Exception/UnitConversionException.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Rate\\Money' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Rate/Money.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Rate\\ShipmentRating' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Rate/ShipmentRating.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Rate\\ShipmentRatingImplementation' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Rate/ShipmentRatingImplementation.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Rate\\SingleRate' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Rate/SingleRate.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Settings\\BlackoutLeadDays' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Settings/BlackoutLeadDays.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Settings\\DefinitionModifier\\SettingsDefinitionModifierAfter' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Settings/DefinitionModifier/SettingsDefinitionModifierAfter.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Settings\\DefinitionModifier\\SettingsDefinitionModifierBefore' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Settings/DefinitionModifier/SettingsDefinitionModifierBefore.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Settings\\SettingsDecorators\\AbstractDecoratorFactory' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Settings/SettingsDecorators/AbstractDecoratorFactory.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Settings\\SettingsDecorators\\BlackoutLeadDaysSettingsDefinitionDecoratorFactory' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Settings/SettingsDecorators/BlackoutLeadDaysSettingsDefinitionDecoratorFactory.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Settings\\SettingsDefinition' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Settings/SettingsDefinition.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Settings\\SettingsValues' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Settings/SettingsValues.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Settings\\SettingsValuesAsArray' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Settings/SettingsValuesAsArray.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Shipment\\Address' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Shipment/Address.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Shipment\\Client' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Shipment/Client.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Shipment\\Dimensions' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Shipment/Dimensions.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Shipment\\Item' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Shipment/Item.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Shipment\\Package' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Shipment/Package.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Shipment\\Shipment' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Shipment/Shipment.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Shipment\\Weight' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Shipment/Weight.php',
'VendorDHL\\WPDesk\\AbstractShipping\\ShippingService' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/ShippingService.php',
'VendorDHL\\WPDesk\\AbstractShipping\\ShippingServiceCapability\\CanInsure' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/ShippingServiceCapability/CanInsure.php',
'VendorDHL\\WPDesk\\AbstractShipping\\ShippingServiceCapability\\CanPack' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/ShippingServiceCapability/CanPack.php',
'VendorDHL\\WPDesk\\AbstractShipping\\ShippingServiceCapability\\CanRate' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/ShippingServiceCapability/CanRate.php',
'VendorDHL\\WPDesk\\AbstractShipping\\ShippingServiceCapability\\CanRateToCollectionPoint' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/ShippingServiceCapability/CanRateToCollectionPoint.php',
'VendorDHL\\WPDesk\\AbstractShipping\\ShippingServiceCapability\\CanReturnDeliveryDate' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/ShippingServiceCapability/CanReturnDeliveryDate.php',
'VendorDHL\\WPDesk\\AbstractShipping\\ShippingServiceCapability\\CanTestSettings' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/ShippingServiceCapability/CanTestSettings.php',
'VendorDHL\\WPDesk\\AbstractShipping\\ShippingServiceCapability\\HasSettings' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/ShippingServiceCapability/HasSettings.php',
'VendorDHL\\WPDesk\\AbstractShipping\\Shop\\ShopSettings' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/Shop/ShopSettings.php',
'VendorDHL\\WPDesk\\AbstractShipping\\UnitConversion\\UniversalDimension' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/UnitConversion/UniversalDimension.php',
'VendorDHL\\WPDesk\\AbstractShipping\\UnitConversion\\UniversalWeight' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/abstract-shipping/src/AbstractShipping/UnitConversion/UniversalWeight.php',
'VendorDHL\\WPDesk\\License\\ActivationForm\\AjaxHandler' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/ActivationForm/AjaxHandler.php',
'VendorDHL\\WPDesk\\License\\ActivationForm\\FormContentRenderer' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/ActivationForm/FormContentRenderer.php',
'VendorDHL\\WPDesk\\License\\ActivationForm\\PluginsPageRenderer' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/ActivationForm/PluginsPageRenderer.php',
'VendorDHL\\WPDesk\\License\\ActivationForm\\Renderer' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/ActivationForm/Renderer.php',
'VendorDHL\\WPDesk\\License\\Changelog\\Filter\\ByVersion' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Changelog/Filter/ByVersion.php',
'VendorDHL\\WPDesk\\License\\Changelog\\Formatter' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Changelog/Formatter.php',
'VendorDHL\\WPDesk\\License\\Changelog\\Parser' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Changelog/Parser.php',
'VendorDHL\\WPDesk\\License\\Changelog\\Parser\\Line' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Changelog/Parser/Line.php',
'VendorDHL\\WPDesk\\License\\InstalledPlugins' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/InstalledPlugins.php',
'VendorDHL\\WPDesk\\License\\LicenseManager' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/LicenseManager.php',
'VendorDHL\\WPDesk\\License\\LicenseServer\\PluginExternalBlocking' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/LicenseServer/PluginExternalBlocking.php',
'VendorDHL\\WPDesk\\License\\LicenseServer\\PluginLicense' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/LicenseServer/PluginLicense.php',
'VendorDHL\\WPDesk\\License\\LicenseServer\\PluginRegistrator' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/LicenseServer/PluginRegistrator.php',
'VendorDHL\\WPDesk\\License\\LicenseServer\\PluginUpgrade' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/LicenseServer/PluginUpgrade.php',
'VendorDHL\\WPDesk\\License\\LicenseServer\\PluginViewVersionInfo' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/LicenseServer/PluginViewVersionInfo.php',
'VendorDHL\\WPDesk\\License\\OldLicenseRegistrator' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/OldLicenseRegistrator.php',
'VendorDHL\\WPDesk\\License\\Page\\Action' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/Action.php',
'VendorDHL\\WPDesk\\License\\Page\\LicensePage' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/LicensePage.php',
'VendorDHL\\WPDesk\\License\\Page\\LicensePageActions' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/LicensePageActions.php',
'VendorDHL\\WPDesk\\License\\Page\\License\\Action\\AbstractAction' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/License/Action/AbstractAction.php',
'VendorDHL\\WPDesk\\License\\Page\\License\\Action\\ActionError' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/License/Action/ActionError.php',
'VendorDHL\\WPDesk\\License\\Page\\License\\Action\\LicenseActivation' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/License/Action/LicenseActivation.php',
'VendorDHL\\WPDesk\\License\\Page\\License\\Action\\LicenseDeactivation' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/License/Action/LicenseDeactivation.php',
'VendorDHL\\WPDesk\\License\\Page\\License\\Action\\Nothing' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/License/Action/Nothing.php',
'VendorDHL\\WPDesk\\License\\PluginLicense' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/PluginLicense.php',
'VendorDHL\\WPDesk\\License\\PluginRegistrator' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/PluginRegistrator.php',
'VendorDHL\\WPDesk\\License\\PluginRegistratorInterface' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/PluginRegistratorInterface.php',
'VendorDHL\\WPDesk\\License\\ServerAddressRepository' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/ServerAddressRepository.php',
'VendorDHL\\WPDesk\\License\\WpUpgrader\\SubscriptionHandler' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/WpUpgrader/SubscriptionHandler.php',
'VendorDHL\\WPDesk\\Logger\\BasicLoggerFactory' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-logs/src/BasicLoggerFactory.php',
'VendorDHL\\WPDesk\\Logger\\LoggerFacade' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-logs/src/LoggerFacade.php',
'VendorDHL\\WPDesk\\Logger\\LoggerFactory' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-logs/src/LoggerFactory.php',
'VendorDHL\\WPDesk\\Logger\\Settings' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-logs/src/Settings.php',
'VendorDHL\\WPDesk\\Logger\\SimpleLoggerFactory' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-logs/src/SimpleLoggerFactory.php',
'VendorDHL\\WPDesk\\Logger\\WC\\Exception\\WCLoggerAlreadyCaptured' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-logs/src/WC/Exception/WCLoggerAlreadyCaptured.php',
'VendorDHL\\WPDesk\\Logger\\WC\\WooCommerceCapture' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-logs/src/WC/WooCommerceCapture.php',
'VendorDHL\\WPDesk\\Logger\\WC\\WooCommerceHandler' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-logs/src/WC/WooCommerceHandler.php',
'VendorDHL\\WPDesk\\Logger\\WC\\WooCommerceMonologPlugin' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-logs/src/WC/WooCommerceMonologPlugin.php',
'VendorDHL\\WPDesk\\Logger\\WPDeskLoggerFactory' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-logs/src/WPDeskLoggerFactory.php',
'VendorDHL\\WPDesk\\Logger\\WP\\WPCapture' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-logs/src/WP/WPCapture.php',
'VendorDHL\\WPDesk\\Notice\\AjaxHandler' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-notice/src/WPDesk/Notice/AjaxHandler.php',
'VendorDHL\\WPDesk\\Notice\\Factory' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-notice/src/WPDesk/Notice/Factory.php',
'VendorDHL\\WPDesk\\Notice\\Notice' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-notice/src/WPDesk/Notice/Notice.php',
'VendorDHL\\WPDesk\\Notice\\PermanentDismissibleNotice' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-notice/src/WPDesk/Notice/PermanentDismissibleNotice.php',
'VendorDHL\\WPDesk\\PluginBuilder\\BuildDirector\\LegacyBuildDirector' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/BuildDirector/LegacyBuildDirector.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Builder\\AbstractBuilder' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Builder/AbstractBuilder.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Builder\\InfoActivationBuilder' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Builder/InfoActivationBuilder.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Builder\\InfoBuilder' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Builder/InfoBuilder.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\AbstractPlugin' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/AbstractPlugin.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\Activateable' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/Activateable.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\ActivationAware' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/ActivationAware.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\ActivationTracker' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/ActivationTracker.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\Conditional' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/Conditional.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\Deactivateable' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/Deactivateable.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\Hookable' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/Hookable.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\HookableCollection' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/HookableCollection.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\HookableParent' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/HookableParent.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\HookablePluginDependant' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/HookablePluginDependant.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\PluginAccess' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/PluginAccess.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\SlimPlugin' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/SlimPlugin.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Plugin\\TemplateLoad' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/TemplateLoad.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Storage\\Exception\\ClassAlreadyExists' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Storage/Exception/ClassAlreadyExists.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Storage\\Exception\\ClassNotExists' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Storage/Exception/ClassNotExists.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Storage\\PluginStorage' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Storage/PluginStorage.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Storage\\StaticStorage' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Storage/StaticStorage.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Storage\\StorageFactory' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Storage/StorageFactory.php',
'VendorDHL\\WPDesk\\PluginBuilder\\Storage\\WordpressFilterStorage' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Storage/WordpressFilterStorage.php',
'VendorDHL\\WPDesk\\Plugin\\Flow\\Initialization\\BuilderTrait' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-plugin-flow-common/src/Initialization/BuilderTrait.php',
'VendorDHL\\WPDesk\\Plugin\\Flow\\Initialization\\InitializationFactory' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-plugin-flow-common/src/Initialization/InitializationFactory.php',
'VendorDHL\\WPDesk\\Plugin\\Flow\\Initialization\\InitializationStrategy' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-plugin-flow-common/src/Initialization/InitializationStrategy.php',
'VendorDHL\\WPDesk\\Plugin\\Flow\\Initialization\\PluginDisablerByFileTrait' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-plugin-flow-common/src/Initialization/PluginDisablerByFileTrait.php',
'VendorDHL\\WPDesk\\Plugin\\Flow\\Initialization\\Simple\\SimpleFactory' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-plugin-flow-common/src/Initialization/Simple/SimpleFactory.php',
'VendorDHL\\WPDesk\\Plugin\\Flow\\Initialization\\Simple\\SimpleFreeStrategy' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-plugin-flow-common/src/Initialization/Simple/SimpleFreeStrategy.php',
'VendorDHL\\WPDesk\\Plugin\\Flow\\Initialization\\Simple\\SimplePaidStrategy' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-plugin-flow-common/src/Initialization/Simple/SimplePaidStrategy.php',
'VendorDHL\\WPDesk\\Plugin\\Flow\\Initialization\\Simple\\TrackerInstanceAsFilterTrait' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-plugin-flow-common/src/Initialization/TrackerInstanceAsFilterTrait.php',
'VendorDHL\\WPDesk\\Plugin\\Flow\\PluginBootstrap' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-plugin-flow-common/src/PluginBootstrap.php',
'VendorDHL\\WPDesk\\SOAP\\SoapClientWithLogger' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/soap-client-with-logger/src/SOAP/SoapClientWithLogger.php',
'VendorDHL\\WPDesk\\Tracker\\Assets' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/Assets.php',
'VendorDHL\\WPDesk\\Tracker\\Deactivation\\AjaxDeactivationDataHandler' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/AjaxDeactivationDataHandler.php',
'VendorDHL\\WPDesk\\Tracker\\Deactivation\\DeactivationContent' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/DeactivationContent.php',
'VendorDHL\\WPDesk\\Tracker\\Deactivation\\PluginData' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/PluginData.php',
'VendorDHL\\WPDesk\\Tracker\\Deactivation\\Scripts' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/Scripts.php',
'VendorDHL\\WPDesk\\Tracker\\Deactivation\\Thickbox' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/Thickbox.php',
'VendorDHL\\WPDesk\\Tracker\\Deactivation\\Tracker' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/Tracker.php',
'VendorDHL\\WPDesk\\Tracker\\Deactivation\\TrackerFactory' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker-deactivation/src/WPDesk/Tracker/Deactivation/TrackerFactory.php',
'VendorDHL\\WPDesk\\Tracker\\OptInOptOut' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/OptInOptOut.php',
'VendorDHL\\WPDesk\\Tracker\\OptInPage' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/OptInPage.php',
'VendorDHL\\WPDesk\\Tracker\\OptOut' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/OptOut.php',
'VendorDHL\\WPDesk\\Tracker\\PluginActionLinks' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/PluginActionLinks.php',
'VendorDHL\\WPDesk\\Tracker\\Shop' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/Shop.php',
'VendorDHL\\WPDesk\\View\\PluginViewBuilder' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-view/src/PluginViewBuilder.php',
'VendorDHL\\WPDesk\\View\\Renderer\\LoadTemplatePlugin' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-view/src/Renderer/LoadTemplatePlugin.php',
'VendorDHL\\WPDesk\\View\\Renderer\\Renderer' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-view/src/Renderer/Renderer.php',
'VendorDHL\\WPDesk\\View\\Renderer\\SimplePhpRenderer' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-view/src/Renderer/SimplePhpRenderer.php',
'VendorDHL\\WPDesk\\View\\Resolver\\ChainResolver' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-view/src/Resolver/ChainResolver.php',
'VendorDHL\\WPDesk\\View\\Resolver\\DirResolver' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-view/src/Resolver/DirResolver.php',
'VendorDHL\\WPDesk\\View\\Resolver\\Exception\\CanNotResolve' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-view/src/Resolver/Exception/CanNotResolve.php',
'VendorDHL\\WPDesk\\View\\Resolver\\NullResolver' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-view/src/Resolver/NullResolver.php',
'VendorDHL\\WPDesk\\View\\Resolver\\Resolver' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-view/src/Resolver/Resolver.php',
'VendorDHL\\WPDesk\\View\\Resolver\\WPThemeResolver' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-view/src/Resolver/WPThemeResolver.php',
'VendorDHL\\WPDesk\\WooCommerceShippingMethod\\Field\\ApiConnectionStatus\\ApiConnectionRenderer' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-woocommerce-shipping-method/src/Field/ApiConnectionStatus/ApiConnectionRenderer.php',
'VendorDHL\\WPDesk\\WooCommerceShippingMethod\\Field\\ApiConnectionStatus\\ApiConnectionStatus' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-woocommerce-shipping-method/src/Field/ApiConnectionStatus/ApiConnectionStatus.php',
'VendorDHL\\WPDesk\\WooCommerceShippingMethod\\Field\\ApiConnectionStatus\\ApiConnectionStatusAjax' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-woocommerce-shipping-method/src/Field/ApiConnectionStatus/ApiConnectionStatusAjax.php',
'VendorDHL\\WPDesk\\WooCommerceShippingMethod\\Field\\ApiConnectionStatus\\HasApiConnectionStatusField' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-woocommerce-shipping-method/src/Field/ApiConnectionStatus/HasApiConnectionStatusField.php',
'VendorDHL\\WPDesk_API_KEY' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/ApiManager/class-wc-key-api.php',
'VendorDHL\\WPDesk_API_MENU' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/ApiManager/class-wc-api-manager-menu.php',
'VendorDHL\\WPDesk_API_Manager_With_Update_Flag' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/ApiManager/class-wc-api-manager.php',
'VendorDHL\\WPDesk_API_Password_Management' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/ApiManager/class-wc-api-manager-passwords.php',
'VendorDHL\\WPDesk_Basic_Requirement_Checker' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-basic-requirements/src/Basic_Requirement_Checker.php',
'VendorDHL\\WPDesk_Basic_Requirement_Checker_Factory' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-basic-requirements/src/Basic_Requirement_Checker_Factory.php',
'VendorDHL\\WPDesk_Basic_Requirement_Checker_With_Update_Disable' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-basic-requirements/src/Basic_Requirement_Checker_With_Update_Disable.php',
'VendorDHL\\WPDesk_Buildable' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Buildable.php',
'VendorDHL\\WPDesk_Has_Plugin_Info' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Has_Plugin_Info.php',
'VendorDHL\\WPDesk_Helper_List_Table' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/Page/License/views/class-wpdesk-helper-list-table.php',
'VendorDHL\\WPDesk_Logger' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-logs/src/deprecated/wpdesk-logger.php',
'VendorDHL\\WPDesk_Logger_Factory' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-logs/src/deprecated/wpdesk-logger-factory.php',
'VendorDHL\\WPDesk_Plugin_Info' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Plugin_Info.php',
'VendorDHL\\WPDesk_Requirement_Checker' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-basic-requirements/src/Requirement_Checker.php',
'VendorDHL\\WPDesk_Requirement_Checker_Factory' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-basic-requirements/src/Requirement_Checker_Factory.php',
'VendorDHL\\WPDesk_Tracker' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/class-wpdesk-tracker.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Gateways' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-gateways.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Identification' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-identification.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Identification_Gdpr' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-identification-gdpr.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Jetpack' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-jetpack.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_License_Emails' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-license-emails.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Orders' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-orders.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Orders_Country' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-orders-country.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Orders_Month' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-orders-month.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Plugins' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-plugins.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Products' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-products.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Products_Variations' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-products-variations.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Server' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-server.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Settings' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-settings.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Shipping_Classes' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-shipping-classes.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Shipping_Methods' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-shipping-methods.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Shipping_Methods_Zones' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-shipping-methods-zones.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Templates' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-templates.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Theme' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-theme.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_User_Agent' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-user-agent.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Users' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-users.php',
'VendorDHL\\WPDesk_Tracker_Data_Provider_Wordpress' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/data_provider/class-wpdesk-tracker-data-provider-wordpress.php',
'VendorDHL\\WPDesk_Tracker_Factory_Prefixed' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/class-wpdesk-tracker-factory-prefixed.php',
'VendorDHL\\WPDesk_Tracker_Interface' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/class-wpdesk-tracker-interface.php',
'VendorDHL\\WPDesk_Tracker_Persistence_Consent' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/persistence/class-wpdesk-tracker-persistence-consent.php',
'VendorDHL\\WPDesk_Tracker_Sender' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/sender/class-wpdesk-tracker-sender.php',
'VendorDHL\\WPDesk_Tracker_Sender_Exception_WpError' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/sender/Exception/class-wpdesk-tracker-sender-exception-wperror.php',
'VendorDHL\\WPDesk_Tracker_Sender_Logged' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/sender/class-wpdesk-tracker-sender-logged.php',
'VendorDHL\\WPDesk_Tracker_Sender_Wordpress_To_WPDesk' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/sender/class-wpdesk-tracker-sender-wordpress-to-wpdesk.php',
'VendorDHL\\WPDesk_Translable' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Translable.php',
'VendorDHL\\WPDesk_Translatable' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-builder/src/Plugin/WithoutNamespace/Translatable.php',
'VendorDHL\\WPDesk_Update_API_Check' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-license/src/ApiManager/class-wc-plugin-update.php',
'WPDesk\\DHL\\ApiConnectionStatusAjax' => __DIR__ . '/../..' . '/src/WPDesk/DHL/ApiConnectionStatusAjax.php',
'WPDesk\\DHL\\Exceptions\\ApiConnectionStatusException' => __DIR__ . '/../..' . '/src/WPDesk/DHL/Exceptions/ApiConnectionStatusException.php',
'WPDesk\\DHL\\HelperTrait' => __DIR__ . '/../..' . '/src/WPDesk/DHL/HelperTrait.php',
'WPDesk\\DHL\\Parcelshop\\CheckoutValidator' => __DIR__ . '/../..' . '/src/WPDesk/DHL/Parcelshop/CheckoutValidator.php',
'WPDesk\\DHL\\SanitizeTrait' => __DIR__ . '/../..' . '/src/WPDesk/DHL/SanitizeTrait.php',
'WPDesk\\Helper\\HelperAsLibrary' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-helper-override/src/Helper/HelperAsLibrary.php',
'WPDesk_Can_Manage_DHL_Weight' => __DIR__ . '/../..' . '/classes/class-can-manage-weight.php',
'WPDesk_Flexible_Shipping_Manifest_dhl' => __DIR__ . '/../..' . '/classes/class-flexible-shipping-manifest.php',
'WPDesk_Flexible_Shipping_Shipment_dhl' => __DIR__ . '/../..' . '/classes/class-flexible-shipping-shipment.php',
'WPDesk_Tracker_Data_Provider' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-helper-override/src/Interop/Tracker/class-wpdesk-tracker-data-provider.php',
'WPDesk_Tracker_Factory' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-helper-override/src/Helper/TrackerFactory.php',
'WPDesk_Tracker_Interface' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-helper-override/src/Interop/Tracker/class-wpdesk-tracker-interface.php',
'WPDesk_Tracker_Sender' => __DIR__ . '/..' . '/wpdesk/wp-wpdesk-helper-override/src/Interop/Tracker/class-wpdesk-tracker-sender.php',
'WPDesk_WooCommerce_DHL' => __DIR__ . '/../..' . '/classes/class-woocommerce-dhl.php',
'WPDesk_WooCommerce_DHL_API' => __DIR__ . '/../..' . '/classes/class-dhl-api.php',
'WPDesk_WooCommerce_DHL_Ajax_Request' => __DIR__ . '/../..' . '/classes/class-ajax-request.php',
'WPDesk_WooCommerce_DHL_FS_Hooks' => __DIR__ . '/../..' . '/classes/class-flexible-shipping-hooks.php',
'WPDesk_WooCommerce_DHL_Flexible_Printing_Integration' => __DIR__ . '/../..' . '/classes/class-flexible-printing-integration.php',
'WPDesk_WooCommerce_DHL_Invalid_Address_Exception' => __DIR__ . '/../..' . '/classes/class-exception-invalid-adress.php',
'WPDesk_WooCommerce_DHL_Parcelshop_API' => __DIR__ . '/../..' . '/classes/class-dhl-parcelshop-api.php',
'WPDesk_WooCommerce_DHL_Select_Parcels_Via_Ajax' => __DIR__ . '/../..' . '/classes/class-search-parcel-via-ajax.php',
'WPDesk_WooCommerce_DHL_Shipping_Method' => __DIR__ . '/../..' . '/classes/class-shipping-method.php',
'WooCommerce_DHL_Plugin' => __DIR__ . '/../..' . '/classes/class-woocommerce-dhl-plugin.php',
);
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitd27e5075b40a04be2431bf30932aa2cd::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitd27e5075b40a04be2431bf30932aa2cd::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitd27e5075b40a04be2431bf30932aa2cd::$classMap;
}, null, ClassLoader::class);
}
}

View File

@@ -0,0 +1,44 @@
{
"packages": [
{
"name": "wpdesk/wp-wpdesk-helper-override",
"version": "1.1.0",
"version_normalized": "1.1.0.0",
"source": {
"type": "git",
"url": "https://gitlab.com/wpdesk/wp-wpdesk-helper-override.git",
"reference": "77844fc71da7ebb7645f10f0fc15f5294fed8542"
},
"dist": {
"type": "zip",
"url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-wpdesk-helper-override/repository/archive.zip?sha=77844fc71da7ebb7645f10f0fc15f5294fed8542",
"reference": "77844fc71da7ebb7645f10f0fc15f5294fed8542",
"shasum": ""
},
"require": {
"php": ">=5.6"
},
"require-dev": {
"phpunit/phpunit": "<7"
},
"time": "2019-08-13T07:33:46+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"classmap": [
"src"
]
},
"notification-url": "https://packagist.org/downloads/",
"authors": [
{
"name": "Krzysiek",
"email": "krzysiek@wpdesk.pl"
}
],
"install-path": "../wpdesk/wp-wpdesk-helper-override"
}
],
"dev": false,
"dev-package-names": []
}

View File

@@ -0,0 +1,32 @@
<?php return array(
'root' => array(
'name' => 'wpdesk/plugin-template',
'pretty_version' => '1.12.8',
'version' => '1.12.8.0',
'reference' => '42ed67d3de2e2425a07627c2ae921805a877310d',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev' => false,
),
'versions' => array(
'wpdesk/plugin-template' => array(
'pretty_version' => '1.12.8',
'version' => '1.12.8.0',
'reference' => '42ed67d3de2e2425a07627c2ae921805a877310d',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev_requirement' => false,
),
'wpdesk/wp-wpdesk-helper-override' => array(
'pretty_version' => '1.1.0',
'version' => '1.1.0.0',
'reference' => '77844fc71da7ebb7645f10f0fc15f5294fed8542',
'type' => 'library',
'install_path' => __DIR__ . '/../wpdesk/wp-wpdesk-helper-override',
'aliases' => array(),
'dev_requirement' => false,
),
),
);

View File

@@ -0,0 +1,26 @@
<?php
// platform_check.php @generated by Composer
$issues = array();
if (!(PHP_VERSION_ID >= 70300)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.3.0". You are running ' . PHP_VERSION . '.';
}
if ($issues) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
} elseif (!headers_sent()) {
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
}
}
trigger_error(
'Composer detected issues in your platform: ' . implode(' ', $issues),
E_USER_ERROR
);
}

View File

@@ -0,0 +1,128 @@
<?php
namespace Psr\Log;
/**
* This is a simple Logger implementation that other Loggers can inherit from.
*
* It simply delegates all log-level-specific methods to the `log` method to
* reduce boilerplate code that a simple Logger that does the same thing with
* messages regardless of the error level has to implement.
*/
abstract class AbstractLogger implements LoggerInterface
{
/**
* System is unusable.
*
* @param string $message
* @param array $context
*
* @return void
*/
public function emergency($message, array $context = array())
{
$this->log(LogLevel::EMERGENCY, $message, $context);
}
/**
* Action must be taken immediately.
*
* Example: Entire website down, database unavailable, etc. This should
* trigger the SMS alerts and wake you up.
*
* @param string $message
* @param array $context
*
* @return void
*/
public function alert($message, array $context = array())
{
$this->log(LogLevel::ALERT, $message, $context);
}
/**
* Critical conditions.
*
* Example: Application component unavailable, unexpected exception.
*
* @param string $message
* @param array $context
*
* @return void
*/
public function critical($message, array $context = array())
{
$this->log(LogLevel::CRITICAL, $message, $context);
}
/**
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
*
* @param string $message
* @param array $context
*
* @return void
*/
public function error($message, array $context = array())
{
$this->log(LogLevel::ERROR, $message, $context);
}
/**
* Exceptional occurrences that are not errors.
*
* Example: Use of deprecated APIs, poor use of an API, undesirable things
* that are not necessarily wrong.
*
* @param string $message
* @param array $context
*
* @return void
*/
public function warning($message, array $context = array())
{
$this->log(LogLevel::WARNING, $message, $context);
}
/**
* Normal but significant events.
*
* @param string $message
* @param array $context
*
* @return void
*/
public function notice($message, array $context = array())
{
$this->log(LogLevel::NOTICE, $message, $context);
}
/**
* Interesting events.
*
* Example: User logs in, SQL logs.
*
* @param string $message
* @param array $context
*
* @return void
*/
public function info($message, array $context = array())
{
$this->log(LogLevel::INFO, $message, $context);
}
/**
* Detailed debug information.
*
* @param string $message
* @param array $context
*
* @return void
*/
public function debug($message, array $context = array())
{
$this->log(LogLevel::DEBUG, $message, $context);
}
}

View File

@@ -0,0 +1,7 @@
<?php
namespace Psr\Log;
class InvalidArgumentException extends \InvalidArgumentException
{
}

View File

@@ -0,0 +1,18 @@
<?php
namespace Psr\Log;
/**
* Describes log levels.
*/
class LogLevel
{
const EMERGENCY = 'emergency';
const ALERT = 'alert';
const CRITICAL = 'critical';
const ERROR = 'error';
const WARNING = 'warning';
const NOTICE = 'notice';
const INFO = 'info';
const DEBUG = 'debug';
}

View File

@@ -0,0 +1,18 @@
<?php
namespace Psr\Log;
/**
* Describes a logger-aware instance.
*/
interface LoggerAwareInterface
{
/**
* Sets a logger instance on the object.
*
* @param LoggerInterface $logger
*
* @return void
*/
public function setLogger(LoggerInterface $logger);
}

View File

@@ -0,0 +1,26 @@
<?php
namespace Psr\Log;
/**
* Basic Implementation of LoggerAwareInterface.
*/
trait LoggerAwareTrait
{
/**
* The logger instance.
*
* @var LoggerInterface
*/
protected $logger;
/**
* Sets a logger.
*
* @param LoggerInterface $logger
*/
public function setLogger(LoggerInterface $logger)
{
$this->logger = $logger;
}
}

View File

@@ -0,0 +1,125 @@
<?php
namespace Psr\Log;
/**
* Describes a logger instance.
*
* The message MUST be a string or object implementing __toString().
*
* The message MAY contain placeholders in the form: {foo} where foo
* will be replaced by the context data in key "foo".
*
* The context array can contain arbitrary data. The only assumption that
* can be made by implementors is that if an Exception instance is given
* to produce a stack trace, it MUST be in a key named "exception".
*
* See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md
* for the full interface specification.
*/
interface LoggerInterface
{
/**
* System is unusable.
*
* @param string $message
* @param mixed[] $context
*
* @return void
*/
public function emergency($message, array $context = array());
/**
* Action must be taken immediately.
*
* Example: Entire website down, database unavailable, etc. This should
* trigger the SMS alerts and wake you up.
*
* @param string $message
* @param mixed[] $context
*
* @return void
*/
public function alert($message, array $context = array());
/**
* Critical conditions.
*
* Example: Application component unavailable, unexpected exception.
*
* @param string $message
* @param mixed[] $context
*
* @return void
*/
public function critical($message, array $context = array());
/**
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
*
* @param string $message
* @param mixed[] $context
*
* @return void
*/
public function error($message, array $context = array());
/**
* Exceptional occurrences that are not errors.
*
* Example: Use of deprecated APIs, poor use of an API, undesirable things
* that are not necessarily wrong.
*
* @param string $message
* @param mixed[] $context
*
* @return void
*/
public function warning($message, array $context = array());
/**
* Normal but significant events.
*
* @param string $message
* @param mixed[] $context
*
* @return void
*/
public function notice($message, array $context = array());
/**
* Interesting events.
*
* Example: User logs in, SQL logs.
*
* @param string $message
* @param mixed[] $context
*
* @return void
*/
public function info($message, array $context = array());
/**
* Detailed debug information.
*
* @param string $message
* @param mixed[] $context
*
* @return void
*/
public function debug($message, array $context = array());
/**
* Logs with an arbitrary level.
*
* @param mixed $level
* @param string $message
* @param mixed[] $context
*
* @return void
*
* @throws \Psr\Log\InvalidArgumentException
*/
public function log($level, $message, array $context = array());
}

View File

@@ -0,0 +1,142 @@
<?php
namespace Psr\Log;
/**
* This is a simple Logger trait that classes unable to extend AbstractLogger
* (because they extend another class, etc) can include.
*
* It simply delegates all log-level-specific methods to the `log` method to
* reduce boilerplate code that a simple Logger that does the same thing with
* messages regardless of the error level has to implement.
*/
trait LoggerTrait
{
/**
* System is unusable.
*
* @param string $message
* @param array $context
*
* @return void
*/
public function emergency($message, array $context = array())
{
$this->log(LogLevel::EMERGENCY, $message, $context);
}
/**
* Action must be taken immediately.
*
* Example: Entire website down, database unavailable, etc. This should
* trigger the SMS alerts and wake you up.
*
* @param string $message
* @param array $context
*
* @return void
*/
public function alert($message, array $context = array())
{
$this->log(LogLevel::ALERT, $message, $context);
}
/**
* Critical conditions.
*
* Example: Application component unavailable, unexpected exception.
*
* @param string $message
* @param array $context
*
* @return void
*/
public function critical($message, array $context = array())
{
$this->log(LogLevel::CRITICAL, $message, $context);
}
/**
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
*
* @param string $message
* @param array $context
*
* @return void
*/
public function error($message, array $context = array())
{
$this->log(LogLevel::ERROR, $message, $context);
}
/**
* Exceptional occurrences that are not errors.
*
* Example: Use of deprecated APIs, poor use of an API, undesirable things
* that are not necessarily wrong.
*
* @param string $message
* @param array $context
*
* @return void
*/
public function warning($message, array $context = array())
{
$this->log(LogLevel::WARNING, $message, $context);
}
/**
* Normal but significant events.
*
* @param string $message
* @param array $context
*
* @return void
*/
public function notice($message, array $context = array())
{
$this->log(LogLevel::NOTICE, $message, $context);
}
/**
* Interesting events.
*
* Example: User logs in, SQL logs.
*
* @param string $message
* @param array $context
*
* @return void
*/
public function info($message, array $context = array())
{
$this->log(LogLevel::INFO, $message, $context);
}
/**
* Detailed debug information.
*
* @param string $message
* @param array $context
*
* @return void
*/
public function debug($message, array $context = array())
{
$this->log(LogLevel::DEBUG, $message, $context);
}
/**
* Logs with an arbitrary level.
*
* @param mixed $level
* @param string $message
* @param array $context
*
* @return void
*
* @throws \Psr\Log\InvalidArgumentException
*/
abstract public function log($level, $message, array $context = array());
}

View File

@@ -0,0 +1,30 @@
<?php
namespace Psr\Log;
/**
* This Logger can be used to avoid conditional log calls.
*
* Logging should always be optional, and if no logger is provided to your
* library creating a NullLogger instance to have something to throw logs at
* is a good way to avoid littering your code with `if ($this->logger) { }`
* blocks.
*/
class NullLogger extends AbstractLogger
{
/**
* Logs with an arbitrary level.
*
* @param mixed $level
* @param string $message
* @param array $context
*
* @return void
*
* @throws \Psr\Log\InvalidArgumentException
*/
public function log($level, $message, array $context = array())
{
// noop
}
}

View File

@@ -0,0 +1,18 @@
<?php
namespace Psr\Log\Test;
/**
* This class is internal and does not follow the BC promise.
*
* Do NOT use this class in any way.
*
* @internal
*/
class DummyTest
{
public function __toString()
{
return 'DummyTest';
}
}

View File

@@ -0,0 +1,138 @@
<?php
namespace Psr\Log\Test;
use Psr\Log\LoggerInterface;
use Psr\Log\LogLevel;
use PHPUnit\Framework\TestCase;
/**
* Provides a base test class for ensuring compliance with the LoggerInterface.
*
* Implementors can extend the class and implement abstract methods to run this
* as part of their test suite.
*/
abstract class LoggerInterfaceTest extends TestCase
{
/**
* @return LoggerInterface
*/
abstract public function getLogger();
/**
* This must return the log messages in order.
*
* The simple formatting of the messages is: "<LOG LEVEL> <MESSAGE>".
*
* Example ->error('Foo') would yield "error Foo".
*
* @return string[]
*/
abstract public function getLogs();
public function testImplements()
{
$this->assertInstanceOf('Psr\Log\LoggerInterface', $this->getLogger());
}
/**
* @dataProvider provideLevelsAndMessages
*/
public function testLogsAtAllLevels($level, $message)
{
$logger = $this->getLogger();
$logger->{$level}($message, array('user' => 'Bob'));
$logger->log($level, $message, array('user' => 'Bob'));
$expected = array(
$level.' message of level '.$level.' with context: Bob',
$level.' message of level '.$level.' with context: Bob',
);
$this->assertEquals($expected, $this->getLogs());
}
public function provideLevelsAndMessages()
{
return array(
LogLevel::EMERGENCY => array(LogLevel::EMERGENCY, 'message of level emergency with context: {user}'),
LogLevel::ALERT => array(LogLevel::ALERT, 'message of level alert with context: {user}'),
LogLevel::CRITICAL => array(LogLevel::CRITICAL, 'message of level critical with context: {user}'),
LogLevel::ERROR => array(LogLevel::ERROR, 'message of level error with context: {user}'),
LogLevel::WARNING => array(LogLevel::WARNING, 'message of level warning with context: {user}'),
LogLevel::NOTICE => array(LogLevel::NOTICE, 'message of level notice with context: {user}'),
LogLevel::INFO => array(LogLevel::INFO, 'message of level info with context: {user}'),
LogLevel::DEBUG => array(LogLevel::DEBUG, 'message of level debug with context: {user}'),
);
}
/**
* @expectedException \Psr\Log\InvalidArgumentException
*/
public function testThrowsOnInvalidLevel()
{
$logger = $this->getLogger();
$logger->log('invalid level', 'Foo');
}
public function testContextReplacement()
{
$logger = $this->getLogger();
$logger->info('{Message {nothing} {user} {foo.bar} a}', array('user' => 'Bob', 'foo.bar' => 'Bar'));
$expected = array('info {Message {nothing} Bob Bar a}');
$this->assertEquals($expected, $this->getLogs());
}
public function testObjectCastToString()
{
if (method_exists($this, 'createPartialMock')) {
$dummy = $this->createPartialMock('Psr\Log\Test\DummyTest', array('__toString'));
} else {
$dummy = $this->getMock('Psr\Log\Test\DummyTest', array('__toString'));
}
$dummy->expects($this->once())
->method('__toString')
->will($this->returnValue('DUMMY'));
$this->getLogger()->warning($dummy);
$expected = array('warning DUMMY');
$this->assertEquals($expected, $this->getLogs());
}
public function testContextCanContainAnything()
{
$closed = fopen('php://memory', 'r');
fclose($closed);
$context = array(
'bool' => true,
'null' => null,
'string' => 'Foo',
'int' => 0,
'float' => 0.5,
'nested' => array('with object' => new DummyTest),
'object' => new \DateTime,
'resource' => fopen('php://memory', 'r'),
'closed' => $closed,
);
$this->getLogger()->warning('Crazy context data', $context);
$expected = array('warning Crazy context data');
$this->assertEquals($expected, $this->getLogs());
}
public function testContextExceptionKeyCanBeExceptionOrOtherValues()
{
$logger = $this->getLogger();
$logger->warning('Random message', array('exception' => 'oops'));
$logger->critical('Uncaught Exception!', array('exception' => new \LogicException('Fail')));
$expected = array(
'warning Random message',
'critical Uncaught Exception!'
);
$this->assertEquals($expected, $this->getLogs());
}
}

View File

@@ -0,0 +1,147 @@
<?php
namespace Psr\Log\Test;
use Psr\Log\AbstractLogger;
/**
* Used for testing purposes.
*
* It records all records and gives you access to them for verification.
*
* @method bool hasEmergency($record)
* @method bool hasAlert($record)
* @method bool hasCritical($record)
* @method bool hasError($record)
* @method bool hasWarning($record)
* @method bool hasNotice($record)
* @method bool hasInfo($record)
* @method bool hasDebug($record)
*
* @method bool hasEmergencyRecords()
* @method bool hasAlertRecords()
* @method bool hasCriticalRecords()
* @method bool hasErrorRecords()
* @method bool hasWarningRecords()
* @method bool hasNoticeRecords()
* @method bool hasInfoRecords()
* @method bool hasDebugRecords()
*
* @method bool hasEmergencyThatContains($message)
* @method bool hasAlertThatContains($message)
* @method bool hasCriticalThatContains($message)
* @method bool hasErrorThatContains($message)
* @method bool hasWarningThatContains($message)
* @method bool hasNoticeThatContains($message)
* @method bool hasInfoThatContains($message)
* @method bool hasDebugThatContains($message)
*
* @method bool hasEmergencyThatMatches($message)
* @method bool hasAlertThatMatches($message)
* @method bool hasCriticalThatMatches($message)
* @method bool hasErrorThatMatches($message)
* @method bool hasWarningThatMatches($message)
* @method bool hasNoticeThatMatches($message)
* @method bool hasInfoThatMatches($message)
* @method bool hasDebugThatMatches($message)
*
* @method bool hasEmergencyThatPasses($message)
* @method bool hasAlertThatPasses($message)
* @method bool hasCriticalThatPasses($message)
* @method bool hasErrorThatPasses($message)
* @method bool hasWarningThatPasses($message)
* @method bool hasNoticeThatPasses($message)
* @method bool hasInfoThatPasses($message)
* @method bool hasDebugThatPasses($message)
*/
class TestLogger extends AbstractLogger
{
/**
* @var array
*/
public $records = [];
public $recordsByLevel = [];
/**
* @inheritdoc
*/
public function log($level, $message, array $context = [])
{
$record = [
'level' => $level,
'message' => $message,
'context' => $context,
];
$this->recordsByLevel[$record['level']][] = $record;
$this->records[] = $record;
}
public function hasRecords($level)
{
return isset($this->recordsByLevel[$level]);
}
public function hasRecord($record, $level)
{
if (is_string($record)) {
$record = ['message' => $record];
}
return $this->hasRecordThatPasses(function ($rec) use ($record) {
if ($rec['message'] !== $record['message']) {
return false;
}
if (isset($record['context']) && $rec['context'] !== $record['context']) {
return false;
}
return true;
}, $level);
}
public function hasRecordThatContains($message, $level)
{
return $this->hasRecordThatPasses(function ($rec) use ($message) {
return strpos($rec['message'], $message) !== false;
}, $level);
}
public function hasRecordThatMatches($regex, $level)
{
return $this->hasRecordThatPasses(function ($rec) use ($regex) {
return preg_match($regex, $rec['message']) > 0;
}, $level);
}
public function hasRecordThatPasses(callable $predicate, $level)
{
if (!isset($this->recordsByLevel[$level])) {
return false;
}
foreach ($this->recordsByLevel[$level] as $i => $rec) {
if (call_user_func($predicate, $rec, $i)) {
return true;
}
}
return false;
}
public function __call($method, $args)
{
if (preg_match('/(.*)(Debug|Info|Notice|Warning|Error|Critical|Alert|Emergency)(.*)/', $method, $matches) > 0) {
$genericMethod = $matches[1] . ('Records' !== $matches[3] ? 'Record' : '') . $matches[3];
$level = strtolower($matches[2]);
if (method_exists($this, $genericMethod)) {
$args[] = $level;
return call_user_func_array([$this, $genericMethod], $args);
}
}
throw new \BadMethodCallException('Call to undefined method ' . get_class($this) . '::' . $method . '()');
}
public function reset()
{
$this->records = [];
$this->recordsByLevel = [];
}
}

View File

@@ -0,0 +1,26 @@
{
"name": "psr/log",
"description": "Common interface for logging libraries",
"keywords": ["psr", "psr-3", "log"],
"homepage": "https://github.com/php-fig/log",
"license": "MIT",
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"require": {
"php": ">=5.3.0"
},
"autoload": {
"psr-4": {
"Psr\\Log\\": "Psr/Log/"
}
},
"extra": {
"branch-alias": {
"dev-master": "1.1.x-dev"
}
}
}

View File

@@ -0,0 +1,9 @@
## [1.1.0] - 2019-08-13
### Added
- WPDesk_Tracker_Data_Provider
- WPDesk_Tracker_Interface
- WPDesk_Tracker_Sender
## [1.0.0] - 2019-08-02
### Added
- First version with Helper and Tracker override

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2018 wpdesk
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,22 @@
{
"name": "wpdesk/wp-wpdesk-helper-override",
"authors": [
{
"name": "Krzysiek",
"email": "krzysiek@wpdesk.pl"
}
],
"require": {
"php": ">=5.6"
},
"require-dev": {
"phpunit/phpunit": "<7"
},
"autoload": {
"classmap": [
"src"
]
},
"scripts": {
}
}

View File

@@ -0,0 +1,30 @@
<?php
namespace WPDesk\Helper;
/**
* @deprecated Do not use. Only for purpose of compatibility with library 1.x version
*
* @package WPDesk\Helper
*/
class HelperAsLibrary
{
public function hooks()
{
do_action('wpdesk_helper_instance');
}
/**
* @return \WPDesk_Tracker
*/
public function get_tracker()
{
return apply_filters('wpdesk_tracker_instance', null);
}
/**
* @return LoggerInterface
*/
public function get_logger()
{
return apply_filters('wpdesk_logger_instance', null);
}
}

View File

@@ -0,0 +1,30 @@
<?php
/**
* WP Desk Tracker
*
* @class WPDESK_Tracker
* @version 1.3.2
* @package WPDESK/Helper
* @category Class
* @author WP Desk
*/
/**
* @deprecated Do not use. Only for purpose of compatibility with library 1.x version
*
* Class WPDesk_Tracker_Factory
*/
class WPDesk_Tracker_Factory
{
/**
* Creates tracker instance.
*
* @param string $basename Plugin basename.
*
* @return WPDesk_Tracker created tracker.
*/
public function create_tracker($basename)
{
return apply_filters('wpdesk_tracker_instance', null);
}
}

View File

@@ -0,0 +1,12 @@
<?php
interface WPDesk_Tracker_Data_Provider {
/**
* Provides data
*
* @return array Data provided to tracker.
*/
public function get_data();
}

View File

@@ -0,0 +1,20 @@
<?php
interface WPDesk_Tracker_Interface {
/**
* Setter for object that sends data.
*
* @param WPDesk_Tracker_Sender $sender Object that can send payloads.
*/
public function set_sender( WPDesk_Tracker_Sender $sender );
/**
* Attach data provider class to tracker
*
* @param WPDesk_Tracker_Data_Provider $provider
*
* @return void
*/
public function add_data_provider( WPDesk_Tracker_Data_Provider $provider );
}

View File

@@ -0,0 +1,15 @@
<?php
interface WPDesk_Tracker_Sender {
/**
* Sends payload to predefined receiver.
*
* @param array $payload Payload to send.
*
* @return array If succeeded. Array containing 'headers', 'body', 'response', 'cookies', 'filename'.
*/
public function send_payload( array $payload );
}

View File

@@ -0,0 +1,68 @@
{
"name": "monolog\/monolog",
"description": "Sends your logs to files, sockets, inboxes, databases and various web services",
"keywords": [
"log",
"logging",
"psr-3"
],
"homepage": "http:\/\/github.com\/Seldaek\/monolog",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http:\/\/seld.be"
}
],
"require": {
"php": ">=5.3.0",
"psr\/log": "~1.0"
},
"require-dev": {
"phpunit\/phpunit": "~4.5",
"graylog2\/gelf-php": "~1.0",
"sentry\/sentry": "^0.13",
"ruflin\/elastica": ">=0.90 <3.0",
"doctrine\/couchdb": "~1.0@dev",
"aws\/aws-sdk-php": "^2.4.9 || ^3.0",
"php-amqplib\/php-amqplib": "~2.4",
"swiftmailer\/swiftmailer": "^5.3|^6.0",
"php-console\/php-console": "^3.1.3",
"phpstan\/phpstan": "^0.12.59"
},
"suggest": {
"graylog2\/gelf-php": "Allow sending log messages to a GrayLog2 server",
"sentry\/sentry": "Allow sending log messages to a Sentry server",
"doctrine\/couchdb": "Allow sending log messages to a CouchDB server",
"ruflin\/elastica": "Allow sending log messages to an Elastic Search server",
"php-amqplib\/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
"ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
"ext-mongo": "Allow sending log messages to a MongoDB server",
"mongodb\/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver",
"aws\/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
"rollbar\/rollbar": "Allow sending log messages to Rollbar",
"php-console\/php-console": "Allow sending log messages to Google Chrome"
},
"autoload": {
"psr-4": {
"VendorDHL\\Monolog\\": "src\/Monolog"
}
},
"autoload-dev": {
"psr-4": {
"VendorDHL\\Monolog\\": "tests\/Monolog"
}
},
"provide": {
"psr\/log-implementation": "1.0.0"
},
"scripts": {
"test": "vendor\/bin\/phpunit",
"phpstan": "vendor\/bin\/phpstan analyse"
},
"config": {
"lock": false
}
}

View File

@@ -0,0 +1,190 @@
<?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace VendorDHL\Monolog;
use VendorDHL\Psr\Log\LoggerInterface;
use VendorDHL\Psr\Log\LogLevel;
use VendorDHL\Monolog\Handler\AbstractHandler;
/**
* Monolog error handler
*
* A facility to enable logging of runtime errors, exceptions and fatal errors.
*
* Quick setup: <code>ErrorHandler::register($logger);</code>
*
* @author Jordi Boggiano <j.boggiano@seld.be>
*/
class ErrorHandler
{
private $logger;
private $previousExceptionHandler;
private $uncaughtExceptionLevel;
private $previousErrorHandler;
private $errorLevelMap;
private $handleOnlyReportedErrors;
private $hasFatalErrorHandler;
private $fatalLevel;
private $reservedMemory;
private $lastFatalTrace;
private static $fatalErrors = array(\E_ERROR, \E_PARSE, \E_CORE_ERROR, \E_COMPILE_ERROR, \E_USER_ERROR);
public function __construct(\VendorDHL\Psr\Log\LoggerInterface $logger)
{
$this->logger = $logger;
}
/**
* Registers a new ErrorHandler for a given Logger
*
* By default it will handle errors, exceptions and fatal errors
*
* @param LoggerInterface $logger
* @param array|false $errorLevelMap an array of E_* constant to LogLevel::* constant mapping, or false to disable error handling
* @param int|false $exceptionLevel a LogLevel::* constant, or false to disable exception handling
* @param int|false $fatalLevel a LogLevel::* constant, or false to disable fatal error handling
* @return ErrorHandler
*/
public static function register(\VendorDHL\Psr\Log\LoggerInterface $logger, $errorLevelMap = array(), $exceptionLevel = null, $fatalLevel = null)
{
//Forces the autoloader to run for LogLevel. Fixes an autoload issue at compile-time on PHP5.3. See https://github.com/Seldaek/monolog/pull/929
\class_exists('VendorDHL\\Psr\\Log\\LogLevel', \true);
/** @phpstan-ignore-next-line */
$handler = new static($logger);
if ($errorLevelMap !== \false) {
$handler->registerErrorHandler($errorLevelMap);
}
if ($exceptionLevel !== \false) {
$handler->registerExceptionHandler($exceptionLevel);
}
if ($fatalLevel !== \false) {
$handler->registerFatalHandler($fatalLevel);
}
return $handler;
}
public function registerExceptionHandler($level = null, $callPrevious = \true)
{
$prev = \set_exception_handler(array($this, 'handleException'));
$this->uncaughtExceptionLevel = $level;
if ($callPrevious && $prev) {
$this->previousExceptionHandler = $prev;
}
}
public function registerErrorHandler(array $levelMap = array(), $callPrevious = \true, $errorTypes = -1, $handleOnlyReportedErrors = \true)
{
$prev = \set_error_handler(array($this, 'handleError'), $errorTypes);
$this->errorLevelMap = \array_replace($this->defaultErrorLevelMap(), $levelMap);
if ($callPrevious) {
$this->previousErrorHandler = $prev ?: \true;
}
$this->handleOnlyReportedErrors = $handleOnlyReportedErrors;
}
public function registerFatalHandler($level = null, $reservedMemorySize = 20)
{
\register_shutdown_function(array($this, 'handleFatalError'));
$this->reservedMemory = \str_repeat(' ', 1024 * $reservedMemorySize);
$this->fatalLevel = $level;
$this->hasFatalErrorHandler = \true;
}
protected function defaultErrorLevelMap()
{
return array(\E_ERROR => \VendorDHL\Psr\Log\LogLevel::CRITICAL, \E_WARNING => \VendorDHL\Psr\Log\LogLevel::WARNING, \E_PARSE => \VendorDHL\Psr\Log\LogLevel::ALERT, \E_NOTICE => \VendorDHL\Psr\Log\LogLevel::NOTICE, \E_CORE_ERROR => \VendorDHL\Psr\Log\LogLevel::CRITICAL, \E_CORE_WARNING => \VendorDHL\Psr\Log\LogLevel::WARNING, \E_COMPILE_ERROR => \VendorDHL\Psr\Log\LogLevel::ALERT, \E_COMPILE_WARNING => \VendorDHL\Psr\Log\LogLevel::WARNING, \E_USER_ERROR => \VendorDHL\Psr\Log\LogLevel::ERROR, \E_USER_WARNING => \VendorDHL\Psr\Log\LogLevel::WARNING, \E_USER_NOTICE => \VendorDHL\Psr\Log\LogLevel::NOTICE, \E_STRICT => \VendorDHL\Psr\Log\LogLevel::NOTICE, \E_RECOVERABLE_ERROR => \VendorDHL\Psr\Log\LogLevel::ERROR, \E_DEPRECATED => \VendorDHL\Psr\Log\LogLevel::NOTICE, \E_USER_DEPRECATED => \VendorDHL\Psr\Log\LogLevel::NOTICE);
}
/**
* @private
*/
public function handleException($e)
{
$this->logger->log($this->uncaughtExceptionLevel === null ? \VendorDHL\Psr\Log\LogLevel::ERROR : $this->uncaughtExceptionLevel, \sprintf('Uncaught Exception %s: "%s" at %s line %s', \VendorDHL\Monolog\Utils::getClass($e), $e->getMessage(), $e->getFile(), $e->getLine()), array('exception' => $e));
if ($this->previousExceptionHandler) {
\call_user_func($this->previousExceptionHandler, $e);
}
exit(255);
}
/**
* @private
*/
public function handleError($code, $message, $file = '', $line = 0, $context = array())
{
if ($this->handleOnlyReportedErrors && !(\error_reporting() & $code)) {
return;
}
// fatal error codes are ignored if a fatal error handler is present as well to avoid duplicate log entries
if (!$this->hasFatalErrorHandler || !\in_array($code, self::$fatalErrors, \true)) {
$level = isset($this->errorLevelMap[$code]) ? $this->errorLevelMap[$code] : \VendorDHL\Psr\Log\LogLevel::CRITICAL;
$this->logger->log($level, self::codeToString($code) . ': ' . $message, array('code' => $code, 'message' => $message, 'file' => $file, 'line' => $line));
} else {
// http://php.net/manual/en/function.debug-backtrace.php
// As of 5.3.6, DEBUG_BACKTRACE_IGNORE_ARGS option was added.
// Any version less than 5.3.6 must use the DEBUG_BACKTRACE_IGNORE_ARGS constant value '2'.
$trace = \debug_backtrace(\PHP_VERSION_ID < 50306 ? 2 : \DEBUG_BACKTRACE_IGNORE_ARGS);
\array_shift($trace);
// Exclude handleError from trace
$this->lastFatalTrace = $trace;
}
if ($this->previousErrorHandler === \true) {
return \false;
} elseif ($this->previousErrorHandler) {
return \call_user_func($this->previousErrorHandler, $code, $message, $file, $line, $context);
}
}
/**
* @private
*/
public function handleFatalError()
{
$this->reservedMemory = null;
$lastError = \error_get_last();
if ($lastError && \in_array($lastError['type'], self::$fatalErrors, \true)) {
$this->logger->log($this->fatalLevel === null ? \VendorDHL\Psr\Log\LogLevel::ALERT : $this->fatalLevel, 'Fatal Error (' . self::codeToString($lastError['type']) . '): ' . $lastError['message'], array('code' => $lastError['type'], 'message' => $lastError['message'], 'file' => $lastError['file'], 'line' => $lastError['line'], 'trace' => $this->lastFatalTrace));
if ($this->logger instanceof \VendorDHL\Monolog\Logger) {
foreach ($this->logger->getHandlers() as $handler) {
if ($handler instanceof \VendorDHL\Monolog\Handler\AbstractHandler) {
$handler->close();
}
}
}
}
}
private static function codeToString($code)
{
switch ($code) {
case \E_ERROR:
return 'E_ERROR';
case \E_WARNING:
return 'E_WARNING';
case \E_PARSE:
return 'E_PARSE';
case \E_NOTICE:
return 'E_NOTICE';
case \E_CORE_ERROR:
return 'E_CORE_ERROR';
case \E_CORE_WARNING:
return 'E_CORE_WARNING';
case \E_COMPILE_ERROR:
return 'E_COMPILE_ERROR';
case \E_COMPILE_WARNING:
return 'E_COMPILE_WARNING';
case \E_USER_ERROR:
return 'E_USER_ERROR';
case \E_USER_WARNING:
return 'E_USER_WARNING';
case \E_USER_NOTICE:
return 'E_USER_NOTICE';
case \E_STRICT:
return 'E_STRICT';
case \E_RECOVERABLE_ERROR:
return 'E_RECOVERABLE_ERROR';
case \E_DEPRECATED:
return 'E_DEPRECATED';
case \E_USER_DEPRECATED:
return 'E_USER_DEPRECATED';
}
return 'Unknown PHP error';
}
}

View File

@@ -0,0 +1,56 @@
<?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace VendorDHL\Monolog\Formatter;
use VendorDHL\Monolog\Logger;
/**
* Formats a log message according to the ChromePHP array format
*
* @author Christophe Coevoet <stof@notk.org>
*/
class ChromePHPFormatter implements \VendorDHL\Monolog\Formatter\FormatterInterface
{
/**
* Translates Monolog log levels to Wildfire levels.
*/
private $logLevels = array(\VendorDHL\Monolog\Logger::DEBUG => 'log', \VendorDHL\Monolog\Logger::INFO => 'info', \VendorDHL\Monolog\Logger::NOTICE => 'info', \VendorDHL\Monolog\Logger::WARNING => 'warn', \VendorDHL\Monolog\Logger::ERROR => 'error', \VendorDHL\Monolog\Logger::CRITICAL => 'error', \VendorDHL\Monolog\Logger::ALERT => 'error', \VendorDHL\Monolog\Logger::EMERGENCY => 'error');
/**
* {@inheritdoc}
*/
public function format(array $record)
{
// Retrieve the line and file if set and remove them from the formatted extra
$backtrace = 'unknown';
if (isset($record['extra']['file'], $record['extra']['line'])) {
$backtrace = $record['extra']['file'] . ' : ' . $record['extra']['line'];
unset($record['extra']['file'], $record['extra']['line']);
}
$message = array('message' => $record['message']);
if ($record['context']) {
$message['context'] = $record['context'];
}
if ($record['extra']) {
$message['extra'] = $record['extra'];
}
if (\count($message) === 1) {
$message = \reset($message);
}
return array($record['channel'], $message, $backtrace, $this->logLevels[$record['level']]);
}
public function formatBatch(array $records)
{
$formatted = array();
foreach ($records as $record) {
$formatted[] = $this->format($record);
}
return $formatted;
}
}

View File

@@ -0,0 +1,78 @@
<?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace VendorDHL\Monolog\Formatter;
use VendorDHL\Elastica\Document;
/**
* Format a log message into an Elastica Document
*
* @author Jelle Vink <jelle.vink@gmail.com>
*/
class ElasticaFormatter extends \VendorDHL\Monolog\Formatter\NormalizerFormatter
{
/**
* @var string Elastic search index name
*/
protected $index;
/**
* @var string Elastic search document type
*/
protected $type;
/**
* @param string $index Elastic Search index name
* @param string $type Elastic Search document type
*/
public function __construct($index, $type)
{
// elasticsearch requires a ISO 8601 format date with optional millisecond precision.
parent::__construct('Y-m-d\\TH:i:s.uP');
$this->index = $index;
$this->type = $type;
}
/**
* {@inheritdoc}
*/
public function format(array $record)
{
$record = parent::format($record);
return $this->getDocument($record);
}
/**
* Getter index
* @return string
*/
public function getIndex()
{
return $this->index;
}
/**
* Getter type
* @return string
*/
public function getType()
{
return $this->type;
}
/**
* Convert a log message into an Elastica Document
*
* @param array $record Log message
* @return Document
*/
protected function getDocument($record)
{
$document = new \VendorDHL\Elastica\Document();
$document->setData($record);
$document->setType($this->type);
$document->setIndex($this->index);
return $document;
}
}

View File

@@ -0,0 +1,84 @@
<?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace VendorDHL\Monolog\Formatter;
/**
* formats the record to be used in the FlowdockHandler
*
* @author Dominik Liebler <liebler.dominik@gmail.com>
*/
class FlowdockFormatter implements \VendorDHL\Monolog\Formatter\FormatterInterface
{
/**
* @var string
*/
private $source;
/**
* @var string
*/
private $sourceEmail;
/**
* @param string $source
* @param string $sourceEmail
*/
public function __construct($source, $sourceEmail)
{
$this->source = $source;
$this->sourceEmail = $sourceEmail;
}
/**
* {@inheritdoc}
*/
public function format(array $record)
{
$tags = array('#logs', '#' . \strtolower($record['level_name']), '#' . $record['channel']);
foreach ($record['extra'] as $value) {
$tags[] = '#' . $value;
}
$subject = \sprintf('in %s: %s - %s', $this->source, $record['level_name'], $this->getShortMessage($record['message']));
$record['flowdock'] = array('source' => $this->source, 'from_address' => $this->sourceEmail, 'subject' => $subject, 'content' => $record['message'], 'tags' => $tags, 'project' => $this->source);
return $record;
}
/**
* {@inheritdoc}
*/
public function formatBatch(array $records)
{
$formatted = array();
foreach ($records as $record) {
$formatted[] = $this->format($record);
}
return $formatted;
}
/**
* @param string $message
*
* @return string
*/
public function getShortMessage($message)
{
static $hasMbString;
if (null === $hasMbString) {
$hasMbString = \function_exists('mb_strlen');
}
$maxLength = 45;
if ($hasMbString) {
if (\mb_strlen($message, 'UTF-8') > $maxLength) {
$message = \mb_substr($message, 0, $maxLength - 4, 'UTF-8') . ' ...';
}
} else {
if (\strlen($message) > $maxLength) {
$message = \substr($message, 0, $maxLength - 4) . ' ...';
}
}
return $message;
}
}

View File

@@ -0,0 +1,73 @@
<?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace VendorDHL\Monolog\Formatter;
use VendorDHL\Monolog\Utils;
/**
* Class FluentdFormatter
*
* Serializes a log message to Fluentd unix socket protocol
*
* Fluentd config:
*
* <source>
* type unix
* path /var/run/td-agent/td-agent.sock
* </source>
*
* Monolog setup:
*
* $logger = new Monolog\Logger('fluent.tag');
* $fluentHandler = new Monolog\Handler\SocketHandler('unix:///var/run/td-agent/td-agent.sock');
* $fluentHandler->setFormatter(new Monolog\Formatter\FluentdFormatter());
* $logger->pushHandler($fluentHandler);
*
* @author Andrius Putna <fordnox@gmail.com>
*/
class FluentdFormatter implements \VendorDHL\Monolog\Formatter\FormatterInterface
{
/**
* @var bool $levelTag should message level be a part of the fluentd tag
*/
protected $levelTag = \false;
public function __construct($levelTag = \false)
{
if (!\function_exists('json_encode')) {
throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s FluentdUnixFormatter');
}
$this->levelTag = (bool) $levelTag;
}
public function isUsingLevelsInTag()
{
return $this->levelTag;
}
public function format(array $record)
{
$tag = $record['channel'];
if ($this->levelTag) {
$tag .= '.' . \strtolower($record['level_name']);
}
$message = array('message' => $record['message'], 'context' => $record['context'], 'extra' => $record['extra']);
if (!$this->levelTag) {
$message['level'] = $record['level'];
$message['level_name'] = $record['level_name'];
}
return \VendorDHL\Monolog\Utils::jsonEncode(array($tag, $record['datetime']->getTimestamp(), $message));
}
public function formatBatch(array $records)
{
$message = '';
foreach ($records as $record) {
$message .= $this->format($record);
}
return $message;
}
}

View File

@@ -0,0 +1,34 @@
<?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace VendorDHL\Monolog\Formatter;
/**
* Interface for formatters
*
* @author Jordi Boggiano <j.boggiano@seld.be>
*/
interface FormatterInterface
{
/**
* Formats a log record.
*
* @param array $record A record to format
* @return mixed The formatted record
*/
public function format(array $record);
/**
* Formats a set of log records.
*
* @param array $records A set of records to format
* @return mixed The formatted set of records
*/
public function formatBatch(array $records);
}

View File

@@ -0,0 +1,105 @@
<?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace VendorDHL\Monolog\Formatter;
use VendorDHL\Monolog\Logger;
use VendorDHL\Gelf\Message;
/**
* Serializes a log message to GELF
* @see http://www.graylog2.org/about/gelf
*
* @author Matt Lehner <mlehner@gmail.com>
*/
class GelfMessageFormatter extends \VendorDHL\Monolog\Formatter\NormalizerFormatter
{
const DEFAULT_MAX_LENGTH = 32766;
/**
* @var string the name of the system for the Gelf log message
*/
protected $systemName;
/**
* @var string a prefix for 'extra' fields from the Monolog record (optional)
*/
protected $extraPrefix;
/**
* @var string a prefix for 'context' fields from the Monolog record (optional)
*/
protected $contextPrefix;
/**
* @var int max length per field
*/
protected $maxLength;
/**
* Translates Monolog log levels to Graylog2 log priorities.
*/
private $logLevels = array(\VendorDHL\Monolog\Logger::DEBUG => 7, \VendorDHL\Monolog\Logger::INFO => 6, \VendorDHL\Monolog\Logger::NOTICE => 5, \VendorDHL\Monolog\Logger::WARNING => 4, \VendorDHL\Monolog\Logger::ERROR => 3, \VendorDHL\Monolog\Logger::CRITICAL => 2, \VendorDHL\Monolog\Logger::ALERT => 1, \VendorDHL\Monolog\Logger::EMERGENCY => 0);
public function __construct($systemName = null, $extraPrefix = null, $contextPrefix = 'ctxt_', $maxLength = null)
{
parent::__construct('U.u');
$this->systemName = $systemName ?: \gethostname();
$this->extraPrefix = $extraPrefix;
$this->contextPrefix = $contextPrefix;
$this->maxLength = \is_null($maxLength) ? self::DEFAULT_MAX_LENGTH : $maxLength;
}
/**
* {@inheritdoc}
*/
public function format(array $record)
{
$record = parent::format($record);
if (!isset($record['datetime'], $record['message'], $record['level'])) {
throw new \InvalidArgumentException('The record should at least contain datetime, message and level keys, ' . \var_export($record, \true) . ' given');
}
$message = new \VendorDHL\Gelf\Message();
$message->setTimestamp($record['datetime'])->setShortMessage((string) $record['message'])->setHost($this->systemName)->setLevel($this->logLevels[$record['level']]);
// message length + system name length + 200 for padding / metadata
$len = 200 + \strlen((string) $record['message']) + \strlen($this->systemName);
if ($len > $this->maxLength) {
$message->setShortMessage(\substr($record['message'], 0, $this->maxLength));
}
if (isset($record['channel'])) {
$message->setFacility($record['channel']);
}
if (isset($record['extra']['line'])) {
$message->setLine($record['extra']['line']);
unset($record['extra']['line']);
}
if (isset($record['extra']['file'])) {
$message->setFile($record['extra']['file']);
unset($record['extra']['file']);
}
foreach ($record['extra'] as $key => $val) {
$val = \is_scalar($val) || null === $val ? $val : $this->toJson($val);
$len = \strlen($this->extraPrefix . $key . $val);
if ($len > $this->maxLength) {
$message->setAdditional($this->extraPrefix . $key, \substr($val, 0, $this->maxLength));
break;
}
$message->setAdditional($this->extraPrefix . $key, $val);
}
foreach ($record['context'] as $key => $val) {
$val = \is_scalar($val) || null === $val ? $val : $this->toJson($val);
$len = \strlen($this->contextPrefix . $key . $val);
if ($len > $this->maxLength) {
$message->setAdditional($this->contextPrefix . $key, \substr($val, 0, $this->maxLength));
break;
}
$message->setAdditional($this->contextPrefix . $key, $val);
}
if (null === $message->getFile() && isset($record['context']['exception']['file'])) {
if (\preg_match("/^(.+):([0-9]+)\$/", $record['context']['exception']['file'], $matches)) {
$message->setFile($matches[1]);
$message->setLine($matches[2]);
}
}
return $message;
}
}

View File

@@ -0,0 +1,119 @@
<?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace VendorDHL\Monolog\Formatter;
use VendorDHL\Monolog\Logger;
use VendorDHL\Monolog\Utils;
/**
* Formats incoming records into an HTML table
*
* This is especially useful for html email logging
*
* @author Tiago Brito <tlfbrito@gmail.com>
*/
class HtmlFormatter extends \VendorDHL\Monolog\Formatter\NormalizerFormatter
{
/**
* Translates Monolog log levels to html color priorities.
*/
protected $logLevels = array(\VendorDHL\Monolog\Logger::DEBUG => '#cccccc', \VendorDHL\Monolog\Logger::INFO => '#468847', \VendorDHL\Monolog\Logger::NOTICE => '#3a87ad', \VendorDHL\Monolog\Logger::WARNING => '#c09853', \VendorDHL\Monolog\Logger::ERROR => '#f0ad4e', \VendorDHL\Monolog\Logger::CRITICAL => '#FF7708', \VendorDHL\Monolog\Logger::ALERT => '#C12A19', \VendorDHL\Monolog\Logger::EMERGENCY => '#000000');
/**
* @param string $dateFormat The format of the timestamp: one supported by DateTime::format
*/
public function __construct($dateFormat = null)
{
parent::__construct($dateFormat);
}
/**
* Creates an HTML table row
*
* @param string $th Row header content
* @param string $td Row standard cell content
* @param bool $escapeTd false if td content must not be html escaped
* @return string
*/
protected function addRow($th, $td = ' ', $escapeTd = \true)
{
$th = \htmlspecialchars($th, \ENT_NOQUOTES, 'UTF-8');
if ($escapeTd) {
$td = '<pre>' . \htmlspecialchars($td, \ENT_NOQUOTES, 'UTF-8') . '</pre>';
}
return "<tr style=\"padding: 4px;text-align: left;\">\n<th style=\"vertical-align: top;background: #ccc;color: #000\" width=\"100\">{$th}:</th>\n<td style=\"padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000\">" . $td . "</td>\n</tr>";
}
/**
* Create a HTML h1 tag
*
* @param string $title Text to be in the h1
* @param int $level Error level
* @return string
*/
protected function addTitle($title, $level)
{
$title = \htmlspecialchars($title, \ENT_NOQUOTES, 'UTF-8');
return '<h1 style="background: ' . $this->logLevels[$level] . ';color: #ffffff;padding: 5px;" class="monolog-output">' . $title . '</h1>';
}
/**
* Formats a log record.
*
* @param array $record A record to format
* @return mixed The formatted record
*/
public function format(array $record)
{
$output = $this->addTitle($record['level_name'], $record['level']);
$output .= '<table cellspacing="1" width="100%" class="monolog-output">';
$output .= $this->addRow('Message', (string) $record['message']);
$output .= $this->addRow('Time', $record['datetime']->format($this->dateFormat));
$output .= $this->addRow('Channel', $record['channel']);
if ($record['context']) {
$embeddedTable = '<table cellspacing="1" width="100%">';
foreach ($record['context'] as $key => $value) {
$embeddedTable .= $this->addRow($key, $this->convertToString($value));
}
$embeddedTable .= '</table>';
$output .= $this->addRow('Context', $embeddedTable, \false);
}
if ($record['extra']) {
$embeddedTable = '<table cellspacing="1" width="100%">';
foreach ($record['extra'] as $key => $value) {
$embeddedTable .= $this->addRow($key, $this->convertToString($value));
}
$embeddedTable .= '</table>';
$output .= $this->addRow('Extra', $embeddedTable, \false);
}
return $output . '</table>';
}
/**
* Formats a set of log records.
*
* @param array $records A set of records to format
* @return mixed The formatted set of records
*/
public function formatBatch(array $records)
{
$message = '';
foreach ($records as $record) {
$message .= $this->format($record);
}
return $message;
}
protected function convertToString($data)
{
if (null === $data || \is_scalar($data)) {
return (string) $data;
}
$data = $this->normalize($data);
if (\version_compare(\PHP_VERSION, '5.4.0', '>=')) {
return \VendorDHL\Monolog\Utils::jsonEncode($data, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE, \true);
}
return \str_replace('\\/', '/', \VendorDHL\Monolog\Utils::jsonEncode($data, null, \true));
}
}

View File

@@ -0,0 +1,181 @@
<?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace VendorDHL\Monolog\Formatter;
use Exception;
use VendorDHL\Monolog\Utils;
use Throwable;
/**
* Encodes whatever record data is passed to it as json
*
* This can be useful to log to databases or remote APIs
*
* @author Jordi Boggiano <j.boggiano@seld.be>
*/
class JsonFormatter extends \VendorDHL\Monolog\Formatter\NormalizerFormatter
{
const BATCH_MODE_JSON = 1;
const BATCH_MODE_NEWLINES = 2;
protected $batchMode;
protected $appendNewline;
/**
* @var bool
*/
protected $includeStacktraces = \false;
/**
* @param int $batchMode
* @param bool $appendNewline
* @param int $maxDepth
*/
public function __construct($batchMode = self::BATCH_MODE_JSON, $appendNewline = \true, $maxDepth = 9)
{
parent::__construct(null, $maxDepth);
$this->batchMode = $batchMode;
$this->appendNewline = $appendNewline;
}
/**
* The batch mode option configures the formatting style for
* multiple records. By default, multiple records will be
* formatted as a JSON-encoded array. However, for
* compatibility with some API endpoints, alternative styles
* are available.
*
* @return int
*/
public function getBatchMode()
{
return $this->batchMode;
}
/**
* True if newlines are appended to every formatted record
*
* @return bool
*/
public function isAppendingNewlines()
{
return $this->appendNewline;
}
/**
* {@inheritdoc}
*/
public function format(array $record)
{
return $this->toJson($this->normalize($record), \true) . ($this->appendNewline ? "\n" : '');
}
/**
* {@inheritdoc}
*/
public function formatBatch(array $records)
{
switch ($this->batchMode) {
case static::BATCH_MODE_NEWLINES:
return $this->formatBatchNewlines($records);
case static::BATCH_MODE_JSON:
default:
return $this->formatBatchJson($records);
}
}
/**
* @param bool $include
*/
public function includeStacktraces($include = \true)
{
$this->includeStacktraces = $include;
}
/**
* Return a JSON-encoded array of records.
*
* @param array $records
* @return string
*/
protected function formatBatchJson(array $records)
{
return $this->toJson($this->normalize($records), \true);
}
/**
* Use new lines to separate records instead of a
* JSON-encoded array.
*
* @param array $records
* @return string
*/
protected function formatBatchNewlines(array $records)
{
$instance = $this;
$oldNewline = $this->appendNewline;
$this->appendNewline = \false;
\array_walk($records, function (&$value, $key) use($instance) {
$value = $instance->format($value);
});
$this->appendNewline = $oldNewline;
return \implode("\n", $records);
}
/**
* Normalizes given $data.
*
* @param mixed $data
*
* @return mixed
*/
protected function normalize($data, $depth = 0)
{
if ($depth > $this->maxDepth) {
return 'Over ' . $this->maxDepth . ' levels deep, aborting normalization';
}
if (\is_array($data)) {
$normalized = array();
$count = 1;
foreach ($data as $key => $value) {
if ($count++ > 1000) {
$normalized['...'] = 'Over 1000 items (' . \count($data) . ' total), aborting normalization';
break;
}
$normalized[$key] = $this->normalize($value, $depth + 1);
}
return $normalized;
}
if ($data instanceof \Exception || $data instanceof \Throwable) {
return $this->normalizeException($data);
}
if (\is_resource($data)) {
return parent::normalize($data);
}
return $data;
}
/**
* Normalizes given exception with or without its own stack trace based on
* `includeStacktraces` property.
*
* @param Exception|Throwable $e
*
* @return array
*/
protected function normalizeException($e)
{
// TODO 2.0 only check for Throwable
if (!$e instanceof \Exception && !$e instanceof \Throwable) {
throw new \InvalidArgumentException('Exception/Throwable expected, got ' . \gettype($e) . ' / ' . \VendorDHL\Monolog\Utils::getClass($e));
}
$data = array('class' => \VendorDHL\Monolog\Utils::getClass($e), 'message' => $e->getMessage(), 'code' => (int) $e->getCode(), 'file' => $e->getFile() . ':' . $e->getLine());
if ($this->includeStacktraces) {
$trace = $e->getTrace();
foreach ($trace as $frame) {
if (isset($frame['file'])) {
$data['trace'][] = $frame['file'] . ':' . $frame['line'];
}
}
}
if ($previous = $e->getPrevious()) {
$data['previous'] = $this->normalizeException($previous);
}
return $data;
}
}

View File

@@ -0,0 +1,150 @@
<?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace VendorDHL\Monolog\Formatter;
use VendorDHL\Monolog\Utils;
/**
* Formats incoming records into a one-line string
*
* This is especially useful for logging to files
*
* @author Jordi Boggiano <j.boggiano@seld.be>
* @author Christophe Coevoet <stof@notk.org>
*/
class LineFormatter extends \VendorDHL\Monolog\Formatter\NormalizerFormatter
{
const SIMPLE_FORMAT = "[%datetime%] %channel%.%level_name%: %message% %context% %extra%\n";
protected $format;
protected $allowInlineLineBreaks;
protected $ignoreEmptyContextAndExtra;
protected $includeStacktraces;
/**
* @param string $format The format of the message
* @param string $dateFormat The format of the timestamp: one supported by DateTime::format
* @param bool $allowInlineLineBreaks Whether to allow inline line breaks in log entries
* @param bool $ignoreEmptyContextAndExtra
*/
public function __construct($format = null, $dateFormat = null, $allowInlineLineBreaks = \false, $ignoreEmptyContextAndExtra = \false)
{
$this->format = $format ?: static::SIMPLE_FORMAT;
$this->allowInlineLineBreaks = $allowInlineLineBreaks;
$this->ignoreEmptyContextAndExtra = $ignoreEmptyContextAndExtra;
parent::__construct($dateFormat);
}
public function includeStacktraces($include = \true)
{
$this->includeStacktraces = $include;
if ($this->includeStacktraces) {
$this->allowInlineLineBreaks = \true;
}
}
public function allowInlineLineBreaks($allow = \true)
{
$this->allowInlineLineBreaks = $allow;
}
public function ignoreEmptyContextAndExtra($ignore = \true)
{
$this->ignoreEmptyContextAndExtra = $ignore;
}
/**
* {@inheritdoc}
*/
public function format(array $record)
{
$vars = parent::format($record);
$output = $this->format;
foreach ($vars['extra'] as $var => $val) {
if (\false !== \strpos($output, '%extra.' . $var . '%')) {
$output = \str_replace('%extra.' . $var . '%', $this->stringify($val), $output);
unset($vars['extra'][$var]);
}
}
foreach ($vars['context'] as $var => $val) {
if (\false !== \strpos($output, '%context.' . $var . '%')) {
$output = \str_replace('%context.' . $var . '%', $this->stringify($val), $output);
unset($vars['context'][$var]);
}
}
if ($this->ignoreEmptyContextAndExtra) {
if (empty($vars['context'])) {
unset($vars['context']);
$output = \str_replace('%context%', '', $output);
}
if (empty($vars['extra'])) {
unset($vars['extra']);
$output = \str_replace('%extra%', '', $output);
}
}
foreach ($vars as $var => $val) {
if (\false !== \strpos($output, '%' . $var . '%')) {
$output = \str_replace('%' . $var . '%', $this->stringify($val), $output);
}
}
// remove leftover %extra.xxx% and %context.xxx% if any
if (\false !== \strpos($output, '%')) {
$output = \preg_replace('/%(?:extra|context)\\..+?%/', '', $output);
}
return $output;
}
public function formatBatch(array $records)
{
$message = '';
foreach ($records as $record) {
$message .= $this->format($record);
}
return $message;
}
public function stringify($value)
{
return $this->replaceNewlines($this->convertToString($value));
}
protected function normalizeException($e)
{
// TODO 2.0 only check for Throwable
if (!$e instanceof \Exception && !$e instanceof \Throwable) {
throw new \InvalidArgumentException('Exception/Throwable expected, got ' . \gettype($e) . ' / ' . \VendorDHL\Monolog\Utils::getClass($e));
}
$previousText = '';
if ($previous = $e->getPrevious()) {
do {
$previousText .= ', ' . \VendorDHL\Monolog\Utils::getClass($previous) . '(code: ' . $previous->getCode() . '): ' . $previous->getMessage() . ' at ' . $previous->getFile() . ':' . $previous->getLine();
} while ($previous = $previous->getPrevious());
}
$str = '[object] (' . \VendorDHL\Monolog\Utils::getClass($e) . '(code: ' . $e->getCode() . '): ' . $e->getMessage() . ' at ' . $e->getFile() . ':' . $e->getLine() . $previousText . ')';
if ($this->includeStacktraces) {
$str .= "\n[stacktrace]\n" . $e->getTraceAsString() . "\n";
}
return $str;
}
protected function convertToString($data)
{
if (null === $data || \is_bool($data)) {
return \var_export($data, \true);
}
if (\is_scalar($data)) {
return (string) $data;
}
if (\version_compare(\PHP_VERSION, '5.4.0', '>=')) {
return $this->toJson($data, \true);
}
return \str_replace('\\/', '/', $this->toJson($data, \true));
}
protected function replaceNewlines($str)
{
if ($this->allowInlineLineBreaks) {
if (0 === \strpos($str, '{')) {
return \str_replace(array('\\r', '\\n'), array("\r", "\n"), $str);
}
return $str;
}
return \str_replace(array("\r\n", "\r", "\n"), ' ', $str);
}
}

View File

@@ -0,0 +1,44 @@
<?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace VendorDHL\Monolog\Formatter;
/**
* Encodes message information into JSON in a format compatible with Loggly.
*
* @author Adam Pancutt <adam@pancutt.com>
*/
class LogglyFormatter extends \VendorDHL\Monolog\Formatter\JsonFormatter
{
/**
* Overrides the default batch mode to new lines for compatibility with the
* Loggly bulk API.
*
* @param int $batchMode
*/
public function __construct($batchMode = self::BATCH_MODE_NEWLINES, $appendNewline = \false)
{
parent::__construct($batchMode, $appendNewline);
}
/**
* Appends the 'timestamp' parameter for indexing by Loggly.
*
* @see https://www.loggly.com/docs/automated-parsing/#json
* @see \Monolog\Formatter\JsonFormatter::format()
*/
public function format(array $record)
{
if (isset($record["datetime"]) && $record["datetime"] instanceof \DateTime) {
$record["timestamp"] = $record["datetime"]->format("Y-m-d\\TH:i:s.uO");
// TODO 2.0 unset the 'datetime' parameter, retained for BC
}
return parent::format($record);
}
}

View File

@@ -0,0 +1,143 @@
<?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace VendorDHL\Monolog\Formatter;
/**
* Serializes a log message to Logstash Event Format
*
* @see http://logstash.net/
* @see https://github.com/logstash/logstash/blob/master/lib/logstash/event.rb
*
* @author Tim Mower <timothy.mower@gmail.com>
*/
class LogstashFormatter extends \VendorDHL\Monolog\Formatter\NormalizerFormatter
{
const V0 = 0;
const V1 = 1;
/**
* @var string the name of the system for the Logstash log message, used to fill the @source field
*/
protected $systemName;
/**
* @var string an application name for the Logstash log message, used to fill the @type field
*/
protected $applicationName;
/**
* @var string a prefix for 'extra' fields from the Monolog record (optional)
*/
protected $extraPrefix;
/**
* @var string a prefix for 'context' fields from the Monolog record (optional)
*/
protected $contextPrefix;
/**
* @var int logstash format version to use
*/
protected $version;
/**
* @param string $applicationName the application that sends the data, used as the "type" field of logstash
* @param string $systemName the system/machine name, used as the "source" field of logstash, defaults to the hostname of the machine
* @param string $extraPrefix prefix for extra keys inside logstash "fields"
* @param string $contextPrefix prefix for context keys inside logstash "fields", defaults to ctxt_
* @param int $version the logstash format version to use, defaults to 0
*/
public function __construct($applicationName, $systemName = null, $extraPrefix = null, $contextPrefix = 'ctxt_', $version = self::V0)
{
// logstash requires a ISO 8601 format date with optional millisecond precision.
parent::__construct('Y-m-d\\TH:i:s.uP');
$this->systemName = $systemName ?: \gethostname();
$this->applicationName = $applicationName;
$this->extraPrefix = $extraPrefix;
$this->contextPrefix = $contextPrefix;
$this->version = $version;
}
/**
* {@inheritdoc}
*/
public function format(array $record)
{
$record = parent::format($record);
if ($this->version === self::V1) {
$message = $this->formatV1($record);
} else {
$message = $this->formatV0($record);
}
return $this->toJson($message) . "\n";
}
protected function formatV0(array $record)
{
if (empty($record['datetime'])) {
$record['datetime'] = \gmdate('c');
}
$message = array('@timestamp' => $record['datetime'], '@source' => $this->systemName, '@fields' => array());
if (isset($record['message'])) {
$message['@message'] = $record['message'];
}
if (isset($record['channel'])) {
$message['@tags'] = array($record['channel']);
$message['@fields']['channel'] = $record['channel'];
}
if (isset($record['level'])) {
$message['@fields']['level'] = $record['level'];
}
if ($this->applicationName) {
$message['@type'] = $this->applicationName;
}
if (isset($record['extra']['server'])) {
$message['@source_host'] = $record['extra']['server'];
}
if (isset($record['extra']['url'])) {
$message['@source_path'] = $record['extra']['url'];
}
if (!empty($record['extra'])) {
foreach ($record['extra'] as $key => $val) {
$message['@fields'][$this->extraPrefix . $key] = $val;
}
}
if (!empty($record['context'])) {
foreach ($record['context'] as $key => $val) {
$message['@fields'][$this->contextPrefix . $key] = $val;
}
}
return $message;
}
protected function formatV1(array $record)
{
if (empty($record['datetime'])) {
$record['datetime'] = \gmdate('c');
}
$message = array('@timestamp' => $record['datetime'], '@version' => 1, 'host' => $this->systemName);
if (isset($record['message'])) {
$message['message'] = $record['message'];
}
if (isset($record['channel'])) {
$message['type'] = $record['channel'];
$message['channel'] = $record['channel'];
}
if (isset($record['level_name'])) {
$message['level'] = $record['level_name'];
}
if ($this->applicationName) {
$message['type'] = $this->applicationName;
}
if (!empty($record['extra'])) {
foreach ($record['extra'] as $key => $val) {
$message[$this->extraPrefix . $key] = $val;
}
}
if (!empty($record['context'])) {
foreach ($record['context'] as $key => $val) {
$message[$this->contextPrefix . $key] = $val;
}
}
return $message;
}
}

View File

@@ -0,0 +1,88 @@
<?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace VendorDHL\Monolog\Formatter;
use VendorDHL\Monolog\Utils;
/**
* Formats a record for use with the MongoDBHandler.
*
* @author Florian Plattner <me@florianplattner.de>
*/
class MongoDBFormatter implements \VendorDHL\Monolog\Formatter\FormatterInterface
{
private $exceptionTraceAsString;
private $maxNestingLevel;
/**
* @param int $maxNestingLevel 0 means infinite nesting, the $record itself is level 1, $record['context'] is 2
* @param bool $exceptionTraceAsString set to false to log exception traces as a sub documents instead of strings
*/
public function __construct($maxNestingLevel = 3, $exceptionTraceAsString = \true)
{
$this->maxNestingLevel = \max($maxNestingLevel, 0);
$this->exceptionTraceAsString = (bool) $exceptionTraceAsString;
}
/**
* {@inheritDoc}
*/
public function format(array $record)
{
return $this->formatArray($record);
}
/**
* {@inheritDoc}
*/
public function formatBatch(array $records)
{
foreach ($records as $key => $record) {
$records[$key] = $this->format($record);
}
return $records;
}
protected function formatArray(array $record, $nestingLevel = 0)
{
if ($this->maxNestingLevel == 0 || $nestingLevel <= $this->maxNestingLevel) {
foreach ($record as $name => $value) {
if ($value instanceof \DateTime) {
$record[$name] = $this->formatDate($value, $nestingLevel + 1);
} elseif ($value instanceof \Exception) {
$record[$name] = $this->formatException($value, $nestingLevel + 1);
} elseif (\is_array($value)) {
$record[$name] = $this->formatArray($value, $nestingLevel + 1);
} elseif (\is_object($value)) {
$record[$name] = $this->formatObject($value, $nestingLevel + 1);
}
}
} else {
$record = '[...]';
}
return $record;
}
protected function formatObject($value, $nestingLevel)
{
$objectVars = \get_object_vars($value);
$objectVars['class'] = \VendorDHL\Monolog\Utils::getClass($value);
return $this->formatArray($objectVars, $nestingLevel);
}
protected function formatException(\Exception $exception, $nestingLevel)
{
$formattedException = array('class' => \VendorDHL\Monolog\Utils::getClass($exception), 'message' => $exception->getMessage(), 'code' => (int) $exception->getCode(), 'file' => $exception->getFile() . ':' . $exception->getLine());
if ($this->exceptionTraceAsString === \true) {
$formattedException['trace'] = $exception->getTraceAsString();
} else {
$formattedException['trace'] = $exception->getTrace();
}
return $this->formatArray($formattedException, $nestingLevel);
}
protected function formatDate(\DateTime $value, $nestingLevel)
{
return new \MongoDate($value->getTimestamp());
}
}

View File

@@ -0,0 +1,163 @@
<?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace VendorDHL\Monolog\Formatter;
use Exception;
use VendorDHL\Monolog\Utils;
/**
* Normalizes incoming records to remove objects/resources so it's easier to dump to various targets
*
* @author Jordi Boggiano <j.boggiano@seld.be>
*/
class NormalizerFormatter implements \VendorDHL\Monolog\Formatter\FormatterInterface
{
const SIMPLE_DATE = "Y-m-d H:i:s";
protected $dateFormat;
protected $maxDepth;
/**
* @param string $dateFormat The format of the timestamp: one supported by DateTime::format
* @param int $maxDepth
*/
public function __construct($dateFormat = null, $maxDepth = 9)
{
$this->dateFormat = $dateFormat ?: static::SIMPLE_DATE;
$this->maxDepth = $maxDepth;
if (!\function_exists('json_encode')) {
throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s NormalizerFormatter');
}
}
/**
* {@inheritdoc}
*/
public function format(array $record)
{
return $this->normalize($record);
}
/**
* {@inheritdoc}
*/
public function formatBatch(array $records)
{
foreach ($records as $key => $record) {
$records[$key] = $this->format($record);
}
return $records;
}
/**
* @return int
*/
public function getMaxDepth()
{
return $this->maxDepth;
}
/**
* @param int $maxDepth
*/
public function setMaxDepth($maxDepth)
{
$this->maxDepth = $maxDepth;
}
protected function normalize($data, $depth = 0)
{
if ($depth > $this->maxDepth) {
return 'Over ' . $this->maxDepth . ' levels deep, aborting normalization';
}
if (null === $data || \is_scalar($data)) {
if (\is_float($data)) {
if (\is_infinite($data)) {
return ($data > 0 ? '' : '-') . 'INF';
}
if (\is_nan($data)) {
return 'NaN';
}
}
return $data;
}
if (\is_array($data)) {
$normalized = array();
$count = 1;
foreach ($data as $key => $value) {
if ($count++ > 1000) {
$normalized['...'] = 'Over 1000 items (' . \count($data) . ' total), aborting normalization';
break;
}
$normalized[$key] = $this->normalize($value, $depth + 1);
}
return $normalized;
}
if ($data instanceof \DateTime) {
return $data->format($this->dateFormat);
}
if (\is_object($data)) {
// TODO 2.0 only check for Throwable
if ($data instanceof \Exception || \PHP_VERSION_ID > 70000 && $data instanceof \Throwable) {
return $this->normalizeException($data);
}
// non-serializable objects that implement __toString stringified
if (\method_exists($data, '__toString') && !$data instanceof \JsonSerializable) {
$value = $data->__toString();
} else {
// the rest is json-serialized in some way
$value = $this->toJson($data, \true);
}
return \sprintf("[object] (%s: %s)", \VendorDHL\Monolog\Utils::getClass($data), $value);
}
if (\is_resource($data)) {
return \sprintf('[resource] (%s)', \get_resource_type($data));
}
return '[unknown(' . \gettype($data) . ')]';
}
protected function normalizeException($e)
{
// TODO 2.0 only check for Throwable
if (!$e instanceof \Exception && !$e instanceof \Throwable) {
throw new \InvalidArgumentException('Exception/Throwable expected, got ' . \gettype($e) . ' / ' . \VendorDHL\Monolog\Utils::getClass($e));
}
$data = array('class' => \VendorDHL\Monolog\Utils::getClass($e), 'message' => $e->getMessage(), 'code' => (int) $e->getCode(), 'file' => $e->getFile() . ':' . $e->getLine());
if ($e instanceof \SoapFault) {
if (isset($e->faultcode)) {
$data['faultcode'] = $e->faultcode;
}
if (isset($e->faultactor)) {
$data['faultactor'] = $e->faultactor;
}
if (isset($e->detail)) {
if (\is_string($e->detail)) {
$data['detail'] = $e->detail;
} elseif (\is_object($e->detail) || \is_array($e->detail)) {
$data['detail'] = $this->toJson($e->detail, \true);
}
}
}
$trace = $e->getTrace();
foreach ($trace as $frame) {
if (isset($frame['file'])) {
$data['trace'][] = $frame['file'] . ':' . $frame['line'];
}
}
if ($previous = $e->getPrevious()) {
$data['previous'] = $this->normalizeException($previous);
}
return $data;
}
/**
* Return the JSON representation of a value
*
* @param mixed $data
* @param bool $ignoreErrors
* @throws \RuntimeException if encoding fails and errors are not ignored
* @return string
*/
protected function toJson($data, $ignoreErrors = \false)
{
return \VendorDHL\Monolog\Utils::jsonEncode($data, null, $ignoreErrors);
}
}

View File

@@ -0,0 +1,43 @@
<?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace VendorDHL\Monolog\Formatter;
/**
* Formats data into an associative array of scalar values.
* Objects and arrays will be JSON encoded.
*
* @author Andrew Lawson <adlawson@gmail.com>
*/
class ScalarFormatter extends \VendorDHL\Monolog\Formatter\NormalizerFormatter
{
/**
* {@inheritdoc}
*/
public function format(array $record)
{
foreach ($record as $key => $value) {
$record[$key] = $this->normalizeValue($value);
}
return $record;
}
/**
* @param mixed $value
* @return mixed
*/
protected function normalizeValue($value)
{
$normalized = $this->normalize($value);
if (\is_array($normalized) || \is_object($normalized)) {
return $this->toJson($normalized, \true);
}
return $normalized;
}
}

View File

@@ -0,0 +1,81 @@
<?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace VendorDHL\Monolog\Formatter;
use VendorDHL\Monolog\Logger;
/**
* Serializes a log message according to Wildfire's header requirements
*
* @author Eric Clemmons (@ericclemmons) <eric@uxdriven.com>
* @author Christophe Coevoet <stof@notk.org>
* @author Kirill chEbba Chebunin <iam@chebba.org>
*/
class WildfireFormatter extends \VendorDHL\Monolog\Formatter\NormalizerFormatter
{
const TABLE = 'table';
/**
* Translates Monolog log levels to Wildfire levels.
*/
private $logLevels = array(\VendorDHL\Monolog\Logger::DEBUG => 'LOG', \VendorDHL\Monolog\Logger::INFO => 'INFO', \VendorDHL\Monolog\Logger::NOTICE => 'INFO', \VendorDHL\Monolog\Logger::WARNING => 'WARN', \VendorDHL\Monolog\Logger::ERROR => 'ERROR', \VendorDHL\Monolog\Logger::CRITICAL => 'ERROR', \VendorDHL\Monolog\Logger::ALERT => 'ERROR', \VendorDHL\Monolog\Logger::EMERGENCY => 'ERROR');
/**
* {@inheritdoc}
*/
public function format(array $record)
{
// Retrieve the line and file if set and remove them from the formatted extra
$file = $line = '';
if (isset($record['extra']['file'])) {
$file = $record['extra']['file'];
unset($record['extra']['file']);
}
if (isset($record['extra']['line'])) {
$line = $record['extra']['line'];
unset($record['extra']['line']);
}
$record = $this->normalize($record);
$message = array('message' => $record['message']);
$handleError = \false;
if ($record['context']) {
$message['context'] = $record['context'];
$handleError = \true;
}
if ($record['extra']) {
$message['extra'] = $record['extra'];
$handleError = \true;
}
if (\count($message) === 1) {
$message = \reset($message);
}
if (isset($record['context'][self::TABLE])) {
$type = 'TABLE';
$label = $record['channel'] . ': ' . $record['message'];
$message = $record['context'][self::TABLE];
} else {
$type = $this->logLevels[$record['level']];
$label = $record['channel'];
}
// Create JSON object describing the appearance of the message in the console
$json = $this->toJson(array(array('Type' => $type, 'File' => $file, 'Line' => $line, 'Label' => $label), $message), $handleError);
// The message itself is a serialization of the above JSON object + it's length
return \sprintf('%s|%s|', \strlen($json), $json);
}
public function formatBatch(array $records)
{
throw new \BadMethodCallException('Batch formatting does not make sense for the WildfireFormatter');
}
protected function normalize($data, $depth = 0)
{
if (\is_object($data) && !$data instanceof \DateTime) {
return $data;
}
return parent::normalize($data, $depth);
}
}

View File

@@ -0,0 +1,172 @@
<?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace VendorDHL\Monolog\Handler;
use VendorDHL\Monolog\Formatter\FormatterInterface;
use VendorDHL\Monolog\Formatter\LineFormatter;
use VendorDHL\Monolog\Logger;
use VendorDHL\Monolog\ResettableInterface;
/**
* Base Handler class providing the Handler structure
*
* @author Jordi Boggiano <j.boggiano@seld.be>
*/
abstract class AbstractHandler implements \VendorDHL\Monolog\Handler\HandlerInterface, \VendorDHL\Monolog\ResettableInterface
{
protected $level = \VendorDHL\Monolog\Logger::DEBUG;
protected $bubble = \true;
/**
* @var FormatterInterface
*/
protected $formatter;
protected $processors = array();
/**
* @param int|string $level The minimum logging level at which this handler will be triggered
* @param bool $bubble Whether the messages that are handled can bubble up the stack or not
*/
public function __construct($level = \VendorDHL\Monolog\Logger::DEBUG, $bubble = \true)
{
$this->setLevel($level);
$this->bubble = $bubble;
}
/**
* {@inheritdoc}
*/
public function isHandling(array $record)
{
return $record['level'] >= $this->level;
}
/**
* {@inheritdoc}
*/
public function handleBatch(array $records)
{
foreach ($records as $record) {
$this->handle($record);
}
}
/**
* Closes the handler.
*
* This will be called automatically when the object is destroyed
*/
public function close()
{
}
/**
* {@inheritdoc}
*/
public function pushProcessor($callback)
{
if (!\is_callable($callback)) {
throw new \InvalidArgumentException('Processors must be valid callables (callback or object with an __invoke method), ' . \var_export($callback, \true) . ' given');
}
\array_unshift($this->processors, $callback);
return $this;
}
/**
* {@inheritdoc}
*/
public function popProcessor()
{
if (!$this->processors) {
throw new \LogicException('You tried to pop from an empty processor stack.');
}
return \array_shift($this->processors);
}
/**
* {@inheritdoc}
*/
public function setFormatter(\VendorDHL\Monolog\Formatter\FormatterInterface $formatter)
{
$this->formatter = $formatter;
return $this;
}
/**
* {@inheritdoc}
*/
public function getFormatter()
{
if (!$this->formatter) {
$this->formatter = $this->getDefaultFormatter();
}
return $this->formatter;
}
/**
* Sets minimum logging level at which this handler will be triggered.
*
* @param int|string $level Level or level name
* @return self
*/
public function setLevel($level)
{
$this->level = \VendorDHL\Monolog\Logger::toMonologLevel($level);
return $this;
}
/**
* Gets minimum logging level at which this handler will be triggered.
*
* @return int
*/
public function getLevel()
{
return $this->level;
}
/**
* Sets the bubbling behavior.
*
* @param bool $bubble true means that this handler allows bubbling.
* false means that bubbling is not permitted.
* @return self
*/
public function setBubble($bubble)
{
$this->bubble = $bubble;
return $this;
}
/**
* Gets the bubbling behavior.
*
* @return bool true means that this handler allows bubbling.
* false means that bubbling is not permitted.
*/
public function getBubble()
{
return $this->bubble;
}
public function __destruct()
{
try {
$this->close();
} catch (\Exception $e) {
// do nothing
} catch (\Throwable $e) {
// do nothing
}
}
public function reset()
{
foreach ($this->processors as $processor) {
if ($processor instanceof \VendorDHL\Monolog\ResettableInterface) {
$processor->reset();
}
}
}
/**
* Gets the default formatter.
*
* @return FormatterInterface
*/
protected function getDefaultFormatter()
{
return new \VendorDHL\Monolog\Formatter\LineFormatter();
}
}

View File

@@ -0,0 +1,59 @@
<?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace VendorDHL\Monolog\Handler;
use VendorDHL\Monolog\ResettableInterface;
/**
* Base Handler class providing the Handler structure
*
* Classes extending it should (in most cases) only implement write($record)
*
* @author Jordi Boggiano <j.boggiano@seld.be>
* @author Christophe Coevoet <stof@notk.org>
*/
abstract class AbstractProcessingHandler extends \VendorDHL\Monolog\Handler\AbstractHandler
{
/**
* {@inheritdoc}
*/
public function handle(array $record)
{
if (!$this->isHandling($record)) {
return \false;
}
$record = $this->processRecord($record);
$record['formatted'] = $this->getFormatter()->format($record);
$this->write($record);
return \false === $this->bubble;
}
/**
* Writes the record down to the log of the implementing handler
*
* @param array $record
* @return void
*/
protected abstract function write(array $record);
/**
* Processes a record.
*
* @param array $record
* @return array
*/
protected function processRecord(array $record)
{
if ($this->processors) {
foreach ($this->processors as $processor) {
$record = \call_user_func($processor, $record);
}
}
return $record;
}
}

View File

@@ -0,0 +1,79 @@
<?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace VendorDHL\Monolog\Handler;
use VendorDHL\Monolog\Logger;
use VendorDHL\Monolog\Formatter\LineFormatter;
/**
* Common syslog functionality
*/
abstract class AbstractSyslogHandler extends \VendorDHL\Monolog\Handler\AbstractProcessingHandler
{
protected $facility;
/**
* Translates Monolog log levels to syslog log priorities.
*/
protected $logLevels = array(\VendorDHL\Monolog\Logger::DEBUG => \LOG_DEBUG, \VendorDHL\Monolog\Logger::INFO => \LOG_INFO, \VendorDHL\Monolog\Logger::NOTICE => \LOG_NOTICE, \VendorDHL\Monolog\Logger::WARNING => \LOG_WARNING, \VendorDHL\Monolog\Logger::ERROR => \LOG_ERR, \VendorDHL\Monolog\Logger::CRITICAL => \LOG_CRIT, \VendorDHL\Monolog\Logger::ALERT => \LOG_ALERT, \VendorDHL\Monolog\Logger::EMERGENCY => \LOG_EMERG);
/**
* List of valid log facility names.
*/
protected $facilities = array('auth' => \LOG_AUTH, 'authpriv' => \LOG_AUTHPRIV, 'cron' => \LOG_CRON, 'daemon' => \LOG_DAEMON, 'kern' => \LOG_KERN, 'lpr' => \LOG_LPR, 'mail' => \LOG_MAIL, 'news' => \LOG_NEWS, 'syslog' => \LOG_SYSLOG, 'user' => \LOG_USER, 'uucp' => \LOG_UUCP);
/**
* @param mixed $facility
* @param int $level The minimum logging level at which this handler will be triggered
* @param bool $bubble Whether the messages that are handled can bubble up the stack or not
*/
public function __construct($facility = \LOG_USER, $level = \VendorDHL\Monolog\Logger::DEBUG, $bubble = \true)
{
parent::__construct($level, $bubble);
if (!\defined('PHP_WINDOWS_VERSION_BUILD')) {
$this->facilities['local0'] = \LOG_LOCAL0;
$this->facilities['local1'] = \LOG_LOCAL1;
$this->facilities['local2'] = \LOG_LOCAL2;
$this->facilities['local3'] = \LOG_LOCAL3;
$this->facilities['local4'] = \LOG_LOCAL4;
$this->facilities['local5'] = \LOG_LOCAL5;
$this->facilities['local6'] = \LOG_LOCAL6;
$this->facilities['local7'] = \LOG_LOCAL7;
} else {
$this->facilities['local0'] = 128;
// LOG_LOCAL0
$this->facilities['local1'] = 136;
// LOG_LOCAL1
$this->facilities['local2'] = 144;
// LOG_LOCAL2
$this->facilities['local3'] = 152;
// LOG_LOCAL3
$this->facilities['local4'] = 160;
// LOG_LOCAL4
$this->facilities['local5'] = 168;
// LOG_LOCAL5
$this->facilities['local6'] = 176;
// LOG_LOCAL6
$this->facilities['local7'] = 184;
// LOG_LOCAL7
}
// convert textual description of facility to syslog constant
if (\array_key_exists(\strtolower($facility), $this->facilities)) {
$facility = $this->facilities[\strtolower($facility)];
} elseif (!\in_array($facility, \array_values($this->facilities), \true)) {
throw new \UnexpectedValueException('Unknown facility value "' . $facility . '" given');
}
$this->facility = $facility;
}
/**
* {@inheritdoc}
*/
protected function getDefaultFormatter()
{
return new \VendorDHL\Monolog\Formatter\LineFormatter('%channel%.%level_name%: %message% %context% %extra%');
}
}

View File

@@ -0,0 +1,109 @@
<?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace VendorDHL\Monolog\Handler;
use VendorDHL\Monolog\Logger;
use VendorDHL\Monolog\Formatter\JsonFormatter;
use VendorDHL\PhpAmqpLib\Message\AMQPMessage;
use VendorDHL\PhpAmqpLib\Channel\AMQPChannel;
use AMQPExchange;
class AmqpHandler extends \VendorDHL\Monolog\Handler\AbstractProcessingHandler
{
/**
* @var AMQPExchange|AMQPChannel $exchange
*/
protected $exchange;
/**
* @var string
*/
protected $exchangeName;
/**
* @param AMQPExchange|AMQPChannel $exchange AMQPExchange (php AMQP ext) or PHP AMQP lib channel, ready for use
* @param string $exchangeName
* @param int $level
* @param bool $bubble Whether the messages that are handled can bubble up the stack or not
*/
public function __construct($exchange, $exchangeName = 'log', $level = \VendorDHL\Monolog\Logger::DEBUG, $bubble = \true)
{
if ($exchange instanceof \AMQPExchange) {
$exchange->setName($exchangeName);
} elseif ($exchange instanceof \VendorDHL\PhpAmqpLib\Channel\AMQPChannel) {
$this->exchangeName = $exchangeName;
} else {
throw new \InvalidArgumentException('PhpAmqpLib\\Channel\\AMQPChannel or AMQPExchange instance required');
}
$this->exchange = $exchange;
parent::__construct($level, $bubble);
}
/**
* {@inheritDoc}
*/
protected function write(array $record)
{
$data = $record["formatted"];
$routingKey = $this->getRoutingKey($record);
if ($this->exchange instanceof \AMQPExchange) {
$this->exchange->publish($data, $routingKey, 0, array('delivery_mode' => 2, 'content_type' => 'application/json'));
} else {
$this->exchange->basic_publish($this->createAmqpMessage($data), $this->exchangeName, $routingKey);
}
}
/**
* {@inheritDoc}
*/
public function handleBatch(array $records)
{
if ($this->exchange instanceof \AMQPExchange) {
parent::handleBatch($records);
return;
}
foreach ($records as $record) {
if (!$this->isHandling($record)) {
continue;
}
$record = $this->processRecord($record);
$data = $this->getFormatter()->format($record);
$this->exchange->batch_basic_publish($this->createAmqpMessage($data), $this->exchangeName, $this->getRoutingKey($record));
}
$this->exchange->publish_batch();
}
/**
* Gets the routing key for the AMQP exchange
*
* @param array $record
* @return string
*/
protected function getRoutingKey(array $record)
{
$routingKey = \sprintf(
'%s.%s',
// TODO 2.0 remove substr call
\substr($record['level_name'], 0, 4),
$record['channel']
);
return \strtolower($routingKey);
}
/**
* @param string $data
* @return AMQPMessage
*/
private function createAmqpMessage($data)
{
return new \VendorDHL\PhpAmqpLib\Message\AMQPMessage((string) $data, array('delivery_mode' => 2, 'content_type' => 'application/json'));
}
/**
* {@inheritDoc}
*/
protected function getDefaultFormatter()
{
return new \VendorDHL\Monolog\Formatter\JsonFormatter(\VendorDHL\Monolog\Formatter\JsonFormatter::BATCH_MODE_JSON, \false);
}
}

View File

@@ -0,0 +1,204 @@
<?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace VendorDHL\Monolog\Handler;
use VendorDHL\Monolog\Formatter\LineFormatter;
/**
* Handler sending logs to browser's javascript console with no browser extension required
*
* @author Olivier Poitrey <rs@dailymotion.com>
*/
class BrowserConsoleHandler extends \VendorDHL\Monolog\Handler\AbstractProcessingHandler
{
protected static $initialized = \false;
protected static $records = array();
/**
* {@inheritDoc}
*
* Formatted output may contain some formatting markers to be transferred to `console.log` using the %c format.
*
* Example of formatted string:
*
* You can do [[blue text]]{color: blue} or [[green background]]{background-color: green; color: white}
*/
protected function getDefaultFormatter()
{
return new \VendorDHL\Monolog\Formatter\LineFormatter('[[%channel%]]{macro: autolabel} [[%level_name%]]{font-weight: bold} %message%');
}
/**
* {@inheritDoc}
*/
protected function write(array $record)
{
// Accumulate records
static::$records[] = $record;
// Register shutdown handler if not already done
if (!static::$initialized) {
static::$initialized = \true;
$this->registerShutdownFunction();
}
}
/**
* Convert records to javascript console commands and send it to the browser.
* This method is automatically called on PHP shutdown if output is HTML or Javascript.
*/
public static function send()
{
$format = static::getResponseFormat();
if ($format === 'unknown') {
return;
}
if (\count(static::$records)) {
if ($format === 'html') {
static::writeOutput('<script>' . static::generateScript() . '</script>');
} elseif ($format === 'js') {
static::writeOutput(static::generateScript());
}
static::resetStatic();
}
}
public function close()
{
self::resetStatic();
}
public function reset()
{
self::resetStatic();
}
/**
* Forget all logged records
*/
public static function resetStatic()
{
static::$records = array();
}
/**
* Wrapper for register_shutdown_function to allow overriding
*/
protected function registerShutdownFunction()
{
if (\PHP_SAPI !== 'cli') {
\register_shutdown_function(array('Monolog\\Handler\\BrowserConsoleHandler', 'send'));
}
}
/**
* Wrapper for echo to allow overriding
*
* @param string $str
*/
protected static function writeOutput($str)
{
echo $str;
}
/**
* Checks the format of the response
*
* If Content-Type is set to application/javascript or text/javascript -> js
* If Content-Type is set to text/html, or is unset -> html
* If Content-Type is anything else -> unknown
*
* @return string One of 'js', 'html' or 'unknown'
*/
protected static function getResponseFormat()
{
// Check content type
foreach (\headers_list() as $header) {
if (\stripos($header, 'content-type:') === 0) {
// This handler only works with HTML and javascript outputs
// text/javascript is obsolete in favour of application/javascript, but still used
if (\stripos($header, 'application/javascript') !== \false || \stripos($header, 'text/javascript') !== \false) {
return 'js';
}
if (\stripos($header, 'text/html') === \false) {
return 'unknown';
}
break;
}
}
return 'html';
}
private static function generateScript()
{
$script = array();
foreach (static::$records as $record) {
$context = static::dump('Context', $record['context']);
$extra = static::dump('Extra', $record['extra']);
if (empty($context) && empty($extra)) {
$script[] = static::call_array('log', static::handleStyles($record['formatted']));
} else {
$script = \array_merge($script, array(static::call_array('groupCollapsed', static::handleStyles($record['formatted']))), $context, $extra, array(static::call('groupEnd')));
}
}
return "(function (c) {if (c && c.groupCollapsed) {\n" . \implode("\n", $script) . "\n}})(console);";
}
private static function handleStyles($formatted)
{
$args = array();
$format = '%c' . $formatted;
\preg_match_all('/\\[\\[(.*?)\\]\\]\\{([^}]*)\\}/s', $format, $matches, \PREG_OFFSET_CAPTURE | \PREG_SET_ORDER);
foreach (\array_reverse($matches) as $match) {
$args[] = '"font-weight: normal"';
$args[] = static::quote(static::handleCustomStyles($match[2][0], $match[1][0]));
$pos = $match[0][1];
$format = \substr($format, 0, $pos) . '%c' . $match[1][0] . '%c' . \substr($format, $pos + \strlen($match[0][0]));
}
$args[] = static::quote('font-weight: normal');
$args[] = static::quote($format);
return \array_reverse($args);
}
private static function handleCustomStyles($style, $string)
{
static $colors = array('blue', 'green', 'red', 'magenta', 'orange', 'black', 'grey');
static $labels = array();
return \preg_replace_callback('/macro\\s*:(.*?)(?:;|$)/', function ($m) use($string, &$colors, &$labels) {
if (\trim($m[1]) === 'autolabel') {
// Format the string as a label with consistent auto assigned background color
if (!isset($labels[$string])) {
$labels[$string] = $colors[\count($labels) % \count($colors)];
}
$color = $labels[$string];
return "background-color: {$color}; color: white; border-radius: 3px; padding: 0 2px 0 2px";
}
return $m[1];
}, $style);
}
private static function dump($title, array $dict)
{
$script = array();
$dict = \array_filter($dict);
if (empty($dict)) {
return $script;
}
$script[] = static::call('log', static::quote('%c%s'), static::quote('font-weight: bold'), static::quote($title));
foreach ($dict as $key => $value) {
$value = \json_encode($value);
if (empty($value)) {
$value = static::quote('');
}
$script[] = static::call('log', static::quote('%s: %o'), static::quote($key), $value);
}
return $script;
}
private static function quote($arg)
{
return '"' . \addcslashes($arg, "\"\n\\") . '"';
}
private static function call()
{
$args = \func_get_args();
$method = \array_shift($args);
return static::call_array($method, $args);
}
private static function call_array($method, array $args)
{
return 'c.' . $method . '(' . \implode(', ', $args) . ');';
}
}

View File

@@ -0,0 +1,128 @@
<?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace VendorDHL\Monolog\Handler;
use VendorDHL\Monolog\Logger;
use VendorDHL\Monolog\ResettableInterface;
use VendorDHL\Monolog\Formatter\FormatterInterface;
/**
* Buffers all records until closing the handler and then pass them as batch.
*
* This is useful for a MailHandler to send only one mail per request instead of
* sending one per log message.
*
* @author Christophe Coevoet <stof@notk.org>
*/
class BufferHandler extends \VendorDHL\Monolog\Handler\AbstractHandler
{
protected $handler;
protected $bufferSize = 0;
protected $bufferLimit;
protected $flushOnOverflow;
protected $buffer = array();
protected $initialized = \false;
/**
* @param HandlerInterface $handler Handler.
* @param int $bufferLimit How many entries should be buffered at most, beyond that the oldest items are removed from the buffer.
* @param int $level The minimum logging level at which this handler will be triggered
* @param bool $bubble Whether the messages that are handled can bubble up the stack or not
* @param bool $flushOnOverflow If true, the buffer is flushed when the max size has been reached, by default oldest entries are discarded
*/
public function __construct(\VendorDHL\Monolog\Handler\HandlerInterface $handler, $bufferLimit = 0, $level = \VendorDHL\Monolog\Logger::DEBUG, $bubble = \true, $flushOnOverflow = \false)
{
parent::__construct($level, $bubble);
$this->handler = $handler;
$this->bufferLimit = (int) $bufferLimit;
$this->flushOnOverflow = $flushOnOverflow;
}
/**
* {@inheritdoc}
*/
public function handle(array $record)
{
if ($record['level'] < $this->level) {
return \false;
}
if (!$this->initialized) {
// __destructor() doesn't get called on Fatal errors
\register_shutdown_function(array($this, 'close'));
$this->initialized = \true;
}
if ($this->bufferLimit > 0 && $this->bufferSize === $this->bufferLimit) {
if ($this->flushOnOverflow) {
$this->flush();
} else {
\array_shift($this->buffer);
$this->bufferSize--;
}
}
if ($this->processors) {
foreach ($this->processors as $processor) {
$record = \call_user_func($processor, $record);
}
}
$this->buffer[] = $record;
$this->bufferSize++;
return \false === $this->bubble;
}
public function flush()
{
if ($this->bufferSize === 0) {
return;
}
$this->handler->handleBatch($this->buffer);
$this->clear();
}
public function __destruct()
{
// suppress the parent behavior since we already have register_shutdown_function()
// to call close(), and the reference contained there will prevent this from being
// GC'd until the end of the request
}
/**
* {@inheritdoc}
*/
public function close()
{
$this->flush();
}
/**
* Clears the buffer without flushing any messages down to the wrapped handler.
*/
public function clear()
{
$this->bufferSize = 0;
$this->buffer = array();
}
public function reset()
{
$this->flush();
parent::reset();
if ($this->handler instanceof \VendorDHL\Monolog\ResettableInterface) {
$this->handler->reset();
}
}
/**
* {@inheritdoc}
*/
public function setFormatter(\VendorDHL\Monolog\Formatter\FormatterInterface $formatter)
{
$this->handler->setFormatter($formatter);
return $this;
}
/**
* {@inheritdoc}
*/
public function getFormatter()
{
return $this->handler->getFormatter();
}
}

Some files were not shown because too many files have changed in this diff Show More