Automatically delete PayPal Package

This commit is contained in:
George Burduli 2024-07-29 12:02:37 +04:00
parent 2da1fa0323
commit 96f8c5ef97
No known key found for this signature in database
GPG key ID: 572A97DFDA3D2E5C
2 changed files with 11 additions and 2 deletions

View file

@ -92,6 +92,17 @@ document.addEventListener( 'DOMContentLoaded', () => {
} ); } );
} }
jQuery( document ).on(
'mouseover mouseout',
'#dhl_delete_label',
function ( event ) {
jQuery( '#ppcp-shipment-status' )
.val( 'CANCELLED' )
.trigger( 'change' );
document.querySelector( '.update_shipment' ).click();
}
);
if ( if (
wcShippingTaxSyncEnabled && wcShippingTaxSyncEnabled &&
typeof wcShippingTaxSyncEnabled !== 'undefined' typeof wcShippingTaxSyncEnabled !== 'undefined'

View file

@ -76,8 +76,6 @@ class DhlShipmentIntegration implements Integration {
return; return;
} }
$foo = $tracking_details;
$paypal_order = ppcp_get_paypal_order( $wc_order ); $paypal_order = ppcp_get_paypal_order( $wc_order );
$capture_id = $this->get_paypal_order_transaction_id( $paypal_order ); $capture_id = $this->get_paypal_order_transaction_id( $paypal_order );
$tracking_number = $tracking_details['tracking_number']; $tracking_number = $tracking_details['tracking_number'];