Ïnitial Commit App
This commit is contained in:
parent
ebde8bc052
commit
f9dee33e2f
26 changed files with 6860 additions and 0 deletions
48
webhook/customer-request.php
Normal file
48
webhook/customer-request.php
Normal file
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
include_once '../include/config.php';
|
||||
include_once '../include/common_function.php';
|
||||
|
||||
/* Common function object */
|
||||
$cf_obj = new common_function();
|
||||
|
||||
$shop_info = file_get_contents('php://input');
|
||||
|
||||
/* shop info array */
|
||||
$shop_info = json_decode($shop_info, TRUE);
|
||||
|
||||
$selected_field = 'store_user_id,email';
|
||||
$where = array('shop' => $shop_info['shop_domain']);
|
||||
$table_shop_info = $cf_obj->select_row(TABLE_USER_STORES, $selected_field, $where);
|
||||
|
||||
if ($table_shop_info != '' && !empty($table_shop_info) && $table_shop_info['email'] != '') {
|
||||
$fields = array(
|
||||
'domain' => '',
|
||||
'owner' => '',
|
||||
'shop_plan' => '',
|
||||
'money_format' => '',
|
||||
'currency' => '',
|
||||
'address1' => '',
|
||||
'address2' => '',
|
||||
'city' => '',
|
||||
'country_name' => '',
|
||||
'phone' => '',
|
||||
'province' => '',
|
||||
'zip' => '',
|
||||
'timezone' => '',
|
||||
'iana_timezone' => '',
|
||||
'weight_unit' => ''
|
||||
);
|
||||
|
||||
$where = array('shop' => $shop_info['shop_domain']);
|
||||
$cf_obj->update(TABLE_USER_STORES, $fields, $where);
|
||||
|
||||
/**
|
||||
* Declare array table data deleted after app uninstall rule GDPR
|
||||
*/
|
||||
$table_array = array();
|
||||
|
||||
foreach ($table_array as $table) {
|
||||
$where = array('store_user_id' => $table_shop_info['store_user_id']);
|
||||
$cf_obj->delete($table, $where);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue