gdpr_del_shop.php 467 B

123456789101112131415161718192021222324
  1. <?php
  2. include_once('config.php');
  3. include_once('autoloader.php');
  4. try{
  5. $fp = fopen('php://input', 'r');
  6. $input = json_decode(stream_get_contents($fp), true);
  7. if(isset($input['shop_domain']))
  8. {
  9. $db = new Database();
  10. $result = $db->delete($input['shop_domain']);
  11. echo $result;
  12. }
  13. else
  14. {
  15. echo 'Error deleting shop: No shop domain found in input';
  16. }
  17. }
  18. catch(\Exception $e) {
  19. echo $e->getMessage();
  20. }