ORA-02292: integrity constraint violated - child record found while creating procedures in ORACLE SQL Developer?
No code needed for this, just define the constraint with ON DELETE CASCADE option.

alter table orders drop constraint ORDERS_FK_CUSTOMERS;
alter table orders add constraint ORDERS_FK_CUSTOMERS 
  foreign key (customer_id) references customers(customer_id) on delete cascade;


Same for order_details.