Merge pull request #9076 from mattallan/deleted_order_download_permissions
Don't try add new download permissions if order has been deleted
This commit is contained in:
commit
36e3061618
|
@ -2203,7 +2203,7 @@ class WC_Admin_Post_Types {
|
|||
foreach ( $existing_permissions as $existing_permission ) {
|
||||
$order = wc_get_order( $existing_permission->order_id );
|
||||
|
||||
if ( $order->id ) {
|
||||
if ( ! empty( $order->id ) ) {
|
||||
// Remove permissions
|
||||
if ( ! empty( $removed_download_ids ) ) {
|
||||
foreach ( $removed_download_ids as $download_id ) {
|
||||
|
|
Loading…
Reference in New Issue