Changeset 3238543
- Timestamp:
- 02/11/2025 12:15:13 PM (13 months ago)
- Location:
- marketplace-integration-for-shopee-and-lazada
- Files:
-
- 156 added
- 8 edited
-
tags/1.0.1 (added)
-
tags/1.0.1/LICENSE.txt (added)
-
tags/1.0.1/README.txt (added)
-
tags/1.0.1/admin (added)
-
tags/1.0.1/admin/class-marketplace-integration-for-shopee-and-lazada-admin.php (added)
-
tags/1.0.1/admin/css (added)
-
tags/1.0.1/admin/css/marketplace-integration-for-shopee-and-lazada-admin.css (added)
-
tags/1.0.1/admin/images (added)
-
tags/1.0.1/admin/images/icon.png (added)
-
tags/1.0.1/admin/images/lazada-logo.png (added)
-
tags/1.0.1/admin/images/shopee-logo.png (added)
-
tags/1.0.1/admin/index.php (added)
-
tags/1.0.1/admin/js (added)
-
tags/1.0.1/admin/js/marketplace-integration-for-shopee-and-lazada-admin.js (added)
-
tags/1.0.1/admin/partials (added)
-
tags/1.0.1/admin/partials/marketplace-integration-for-shopee-and-lazada-admin-display.php (added)
-
tags/1.0.1/admin/template (added)
-
tags/1.0.1/admin/template/home (added)
-
tags/1.0.1/admin/template/home/home.php (added)
-
tags/1.0.1/admin/template/home/marketplaces.php (added)
-
tags/1.0.1/includes (added)
-
tags/1.0.1/includes/class-ced-sea-core-functions.php (added)
-
tags/1.0.1/includes/class-marketplace-integration-for-shopee-and-lazada-activator.php (added)
-
tags/1.0.1/includes/class-marketplace-integration-for-shopee-and-lazada-deactivator.php (added)
-
tags/1.0.1/includes/class-marketplace-integration-for-shopee-and-lazada-loader.php (added)
-
tags/1.0.1/includes/class-marketplace-integration-for-shopee-and-lazada.php (added)
-
tags/1.0.1/includes/index.php (added)
-
tags/1.0.1/index.php (added)
-
tags/1.0.1/marketplace-integration-for-shopee-and-lazada.php (added)
-
tags/1.0.1/marketplaces (added)
-
tags/1.0.1/marketplaces/lazada (added)
-
tags/1.0.1/marketplaces/lazada/admin (added)
-
tags/1.0.1/marketplaces/lazada/admin/class-ced-lazada-integration-admin.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/css (added)
-
tags/1.0.1/marketplaces/lazada/admin/css/font-awesome.min.css (added)
-
tags/1.0.1/marketplaces/lazada/admin/css/woo-lazada-integration-admin.css (added)
-
tags/1.0.1/marketplaces/lazada/admin/helper (added)
-
tags/1.0.1/marketplaces/lazada/admin/helper/class-product-fields.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/helper/product_select_filter.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/helper/save-profile-view-data.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/images (added)
-
tags/1.0.1/marketplaces/lazada/admin/images/InventoryData.png (added)
-
tags/1.0.1/marketplaces/lazada/admin/images/MarketplaceData.png (added)
-
tags/1.0.1/marketplaces/lazada/admin/images/UploadOrUpdate.png (added)
-
tags/1.0.1/marketplaces/lazada/admin/images/check.png (added)
-
tags/1.0.1/marketplaces/lazada/admin/images/filter.png (added)
-
tags/1.0.1/marketplaces/lazada/admin/images/icon.png (added)
-
tags/1.0.1/marketplaces/lazada/admin/images/item-sku-id-update.png (added)
-
tags/1.0.1/marketplaces/lazada/admin/images/lazada-cart.jpg (added)
-
tags/1.0.1/marketplaces/lazada/admin/images/lazada-cart.png (added)
-
tags/1.0.1/marketplaces/lazada/admin/images/lazada_gif.gif (added)
-
tags/1.0.1/marketplaces/lazada/admin/images/lazda_two.png (added)
-
tags/1.0.1/marketplaces/lazada/admin/images/success.jpg (added)
-
tags/1.0.1/marketplaces/lazada/admin/js (added)
-
tags/1.0.1/marketplaces/lazada/admin/js/ced_lazada_cat.js (added)
-
tags/1.0.1/marketplaces/lazada/admin/js/custom.js (added)
-
tags/1.0.1/marketplaces/lazada/admin/js/woo-lazada-integration-admin.js (added)
-
tags/1.0.1/marketplaces/lazada/admin/lazada (added)
-
tags/1.0.1/marketplaces/lazada/admin/lazada/Remotecall (added)
-
tags/1.0.1/marketplaces/lazada/admin/lazada/Remotecall/class-marketplace-integration-for-shopee-and-lazada-remote_request.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/lazada/class-lazada.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/lazada/partials (added)
-
tags/1.0.1/marketplaces/lazada/admin/lazada/partials/class-ajax-handler.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/lazada/partials/class-lazada-orders.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/lazada/partials/class-lazada-update-inventory-price.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/lazada/partials/class-lazada-upload.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/lazada/partials/order_template.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/partials (added)
-
tags/1.0.1/marketplaces/lazada/admin/partials/accounts-view.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/partials/category-mapping-view.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/partials/header.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/partials/home.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/partials/logs.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/partials/marketplace-integration-for-shopee-and-lazada-connect-account.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/partials/marketplace-integration-for-shopee-and-lazada-metakeys-list.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/partials/marketplace-integration-for-shopee-and-lazada-metakeys-template.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/partials/marketplace-integration-for-shopee-and-lazada-order-types.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/partials/orders-view-failled.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/partials/orders-view.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/partials/products-import.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/partials/products-view.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/partials/profile-view-edit.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/partials/profiles-view.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/partials/settings-view.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/partials/setup_wizard (added)
-
tags/1.0.1/marketplaces/lazada/admin/partials/setup_wizard/wizard-complete.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/partials/setup_wizard/wizard-general.php (added)
-
tags/1.0.1/marketplaces/lazada/admin/partials/setup_wizard/wizard-global.php (added)
-
tags/1.0.1/marketplaces/lazada/includes (added)
-
tags/1.0.1/marketplaces/lazada/includes/ced-lazada-render-attributes.php (added)
-
tags/1.0.1/marketplaces/lazada/includes/ced_umb_core_functions.php (added)
-
tags/1.0.1/marketplaces/lazada/includes/class-ced-lazada-integration-activator.php (added)
-
tags/1.0.1/marketplaces/lazada/includes/class-ced-lazada-integration-deactivator.php (added)
-
tags/1.0.1/marketplaces/lazada/includes/class-ced-lazada-integration-loader.php (added)
-
tags/1.0.1/marketplaces/lazada/includes/class-ced-lazada-integration.php (added)
-
tags/1.0.1/marketplaces/lazada/includes/class-ced-umb-helper-functions.php (added)
-
tags/1.0.1/marketplaces/lazada/includes/marketplace-integration-for-shopee-and-lazada-core-functions.php (added)
-
tags/1.0.1/marketplaces/lazada/lazada.php (added)
-
tags/1.0.1/marketplaces/shopee (added)
-
tags/1.0.1/marketplaces/shopee/admin (added)
-
tags/1.0.1/marketplaces/shopee/admin/class-ced-shopee-integration-admin.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/css (added)
-
tags/1.0.1/marketplaces/shopee/admin/css/marketplace-shopee-integration.css (added)
-
tags/1.0.1/marketplaces/shopee/admin/css/woocommerce-shopee-integration-admin.css (added)
-
tags/1.0.1/marketplaces/shopee/admin/images (added)
-
tags/1.0.1/marketplaces/shopee/admin/images/loading.gif (added)
-
tags/1.0.1/marketplaces/shopee/admin/images/shopee-card.png (added)
-
tags/1.0.1/marketplaces/shopee/admin/images/success.jpg (added)
-
tags/1.0.1/marketplaces/shopee/admin/index.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/js (added)
-
tags/1.0.1/marketplaces/shopee/admin/js/ced_shopee_cat.js (added)
-
tags/1.0.1/marketplaces/shopee/admin/js/woocommerce-shopee-integration-admin.js (added)
-
tags/1.0.1/marketplaces/shopee/admin/pages (added)
-
tags/1.0.1/marketplaces/shopee/admin/pages/ced-shopee-metakeys-template.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/partials (added)
-
tags/1.0.1/marketplaces/shopee/admin/partials/account-overview.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/partials/ced-shopee-connect-account.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/partials/ced-shopee-metakeys-list.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/partials/class-ced-filterclass.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/partials/class-ced-shopee-list-orders.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/partials/class-ced-shopee-profile-table.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/partials/class-ced-view-product-importer.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/partials/class-ced-view-timeline.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/partials/class-cedshopeeproductsfields.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/partials/class-shopeelistproducts.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/partials/global-settings-view.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/partials/header.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/partials/marketplaces.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/partials/order-template.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/partials/profile-edit-view.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/shopee (added)
-
tags/1.0.1/marketplaces/shopee/admin/shopee/class-class-ced-shopee-manager.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/shopee/class-wizard-setting.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/shopee/lib (added)
-
tags/1.0.1/marketplaces/shopee/admin/shopee/lib/class-ced-shopee-activities.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/shopee/lib/class-class-ced-shopee-category.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/shopee/lib/class-class-ced-shopee-products.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/shopee/lib/class-class-ced-shopee-remote-request.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/shopee/lib/class-class-ced-shopee-shop.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/shopee/lib/class-class-cedshopeeorders.php (added)
-
tags/1.0.1/marketplaces/shopee/admin/shopee/lib/json (added)
-
tags/1.0.1/marketplaces/shopee/images (added)
-
tags/1.0.1/marketplaces/shopee/images/check.png (added)
-
tags/1.0.1/marketplaces/shopee/images/downlaod-icon.png (added)
-
tags/1.0.1/marketplaces/shopee/images/plus_icon.png (added)
-
tags/1.0.1/marketplaces/shopee/includes (added)
-
tags/1.0.1/marketplaces/shopee/includes/ced-shopee-core-functions.php (added)
-
tags/1.0.1/marketplaces/shopee/includes/class-ced-shopee-integration-activator.php (added)
-
tags/1.0.1/marketplaces/shopee/includes/class-ced-shopee-integration-deactivator.php (added)
-
tags/1.0.1/marketplaces/shopee/includes/class-ced-shopee-integration-loader.php (added)
-
tags/1.0.1/marketplaces/shopee/includes/class-ced-shopee-integration.php (added)
-
tags/1.0.1/marketplaces/shopee/includes/index.php (added)
-
tags/1.0.1/marketplaces/shopee/languages (added)
-
tags/1.0.1/marketplaces/shopee/languages/woocommerce-shopee-integration.pot (added)
-
tags/1.0.1/marketplaces/shopee/shopee.php (added)
-
tags/1.0.1/uninstall.php (added)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/marketplace-integration-for-shopee-and-lazada.php (modified) (1 diff)
-
trunk/marketplaces/shopee/admin/js/ced_shopee_cat.js (modified) (2 diffs)
-
trunk/marketplaces/shopee/admin/partials/ced-shopee-metakeys-list.php (modified) (1 diff)
-
trunk/marketplaces/shopee/admin/partials/profile-edit-view.php (modified) (6 diffs)
-
trunk/marketplaces/shopee/admin/shopee/class-class-ced-shopee-manager.php (modified) (7 diffs)
-
trunk/marketplaces/shopee/admin/shopee/lib/class-class-ced-shopee-category.php (modified) (1 diff)
-
trunk/marketplaces/shopee/admin/shopee/lib/class-class-ced-shopee-remote-request.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
marketplace-integration-for-shopee-and-lazada/trunk/README.txt
r3236554 r3238543 6 6 WC requires at least: 7.0.0 7 7 WC tested up to: 9.0.0 8 Stable tag: 1.0. 08 Stable tag: 1.0.1 9 9 License: GPLv3 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 100 100 == Changelog == 101 101 102 = 1.0. 0=103 * First version102 = 1.0.1 = 103 * Bug fix 104 104 105 105 -
marketplace-integration-for-shopee-and-lazada/trunk/marketplace-integration-for-shopee-and-lazada.php
r3236554 r3238543 4 4 * Plugin URI: https://woocommerce.com/vendor/cedcommerce/ 5 5 * Description: Connect your WooCommerce Store to SEA marketplaces like Shopee and Lazada. 6 * Version: 1.0. 06 * Version: 1.0.1 7 7 * Requires at least: 5.8 8 8 * Requires PHP: 7.4 -
marketplace-integration-for-shopee-and-lazada/trunk/marketplaces/shopee/admin/js/ced_shopee_cat.js
r3236554 r3238543 262 262 let shopee_store_id = $("#shopee_shop_id").val(); 263 263 var form_data = $('form').serialize(); 264 // console.log(store_category_array); 265 // console.log(shopee_category_array); 266 // console.log(shopee_category_name); 267 // console.log(shopee_store_id); 268 // console.log(form_data); 269 // alert(); 264 270 $.ajax( 265 271 { … … 282 288 var html = "<div class='notice notice-success'><p>Profile Created Successfully</p></div>"; 283 289 $("#profile_create_message").html(html); 284 window.setTimeout(function () { window.location.reload() }, 2000);290 // window.setTimeout(function () { window.location.reload() }, 2000); 285 291 } 286 292 } -
marketplace-integration-for-shopee-and-lazada/trunk/marketplaces/shopee/admin/partials/ced-shopee-metakeys-list.php
r3236554 r3238543 42 42 $metakey_html = ced_shopee_render_html( $meta_keys_to_be_displayed, $added_meta_keys ); 43 43 $data = array( 44 'html' => wp_kses_post($metakey_html),44 'html' => $metakey_html, 45 45 ); 46 46 -
marketplace-integration-for-shopee-and-lazada/trunk/marketplaces/shopee/admin/partials/profile-edit-view.php
r3236554 r3238543 54 54 55 55 if (isset($_POST['ced_shopee_required_common'])) { 56 56 57 $post_array = filter_input_array(INPUT_POST, FILTER_SANITIZE_FULL_SPECIAL_CHARS); 58 57 59 foreach (($post_array['ced_shopee_required_common']) as $key) { 58 60 $array_to_save = array(); … … 84 86 85 87 $updateinfo = wp_json_encode($profile_data); 86 // print_r($updateinfo); 87 // die(); 88 88 89 if ($profile_id) { 89 90 global $wpdb; … … 106 107 $profile_category_data = json_decode($profile_data[0]['profile_data'], true); 107 108 } 108 // echo '<pre>'; 109 // print_r($profile_data); 110 // die(); 109 111 110 $profile_category_data = isset($profile_category_data) ? $profile_category_data : ''; 112 111 $profile_category_id = isset($profile_category_data['_umb_shopee_category']['default']) ? $profile_category_data['_umb_shopee_category']['default'] : ''; … … 180 179 <form method='POST'> 181 180 <?php 182 if (isset($_GET['profileID']) && $_GET['profileID'] == $profile_data['id']) {183 181 wp_nonce_field('profile_creation', 'profile_creation_submit'); 184 }185 182 ?> 186 183 … … 386 383 $fields = $product_field_instance->ced_shopee_get_required_fields($shopee_shop_id, $profile_category_id, $remote_shop_id); 387 384 $saved_data = $profile_category_data; 388 // echo '<pre>'; 389 // print_r($saved_data); 390 // die(); 385 391 386 foreach ($fields as $value) { 392 387 // print_r($fields); … … 924 919 ?> 925 920 <button style='float: right;' 926 class='button-primary components-button is-primary' id="ced_shopee_save_category_button" >Save Template</button>921 class='button-primary components-button is-primary' id="ced_shopee_save_category_button" value="<?php echo $shopee_shop_id ?>">Save Template</button> 927 922 <?php } ?> 928 923 </div> -
marketplace-integration-for-shopee-and-lazada/trunk/marketplaces/shopee/admin/shopee/class-class-ced-shopee-manager.php
r3236554 r3238543 292 292 $profile_name = isset($shopee_mapped_categories_name[$value]) ? $shopee_mapped_categories_name[$value] : 'Profile for Shopee - Category Id : ' . $value; 293 293 $profile_exists = $this->ced_shopee_check_profile_exists($key, $value, $shopee_store_id, $profile_name); 294 294 // print_r($form_data); 295 295 $profile_data = array(); 296 296 $profile_data = $this->ced_shopee_prepare_profile_data($shopee_store_id, $value, $form_data); 297 297 // print_r($profile_data); 298 // die(); 298 299 /* 299 300 Group profiles … … 304 305 305 306 $is_active = 1; 306 $marketplace_name = ' Shopee';307 $marketplace_name = 'shopee'; 307 308 $woo_categories = array($key); 308 309 … … 314 315 'woo_categories' => wp_json_encode($woo_categories), 315 316 ); 316 317 // print_r($profile_details); 318 // die(); 317 319 $profile_id = $this->insert_shopee_profile($profile_details); 318 320 foreach ($woo_categories as $key12 => $value12) { … … 396 398 */ 397 399 public function ced_shopee_prepare_profile_data($shopee_store_id, $shopee_category_id, $post_array) 398 { 400 { 401 $post_array = filter_input_array(INPUT_POST, FILTER_SANITIZE_FULL_SPECIAL_CHARS); 402 399 403 foreach (($post_array['ced_shopee_required_common']) as $key) { 404 // print_r($key); 405 // die(); 400 406 $array_to_save = array(); 401 407 402 408 isset($post_array[$key][0]) ? $array_to_save['default'] = $post_array[$key][0] : $array_to_save['default'] = ''; 403 409 404 if ('_umb_ ' . $marketplace_name . '_subcategory' == $key) {410 if ('_umb_shopee_subcategory' == $key) { 405 411 isset($post_array[$key]) ? $array_to_save['default'] = $post_array[$key] : $array_to_save['default'] = ''; 406 412 } … … 408 414 isset($post_array[$key][0]) ? $array_to_save['default'] = $post_array[$key] : $array_to_save['default'] = ''; 409 415 } 410 if ('_umb_shopee_category' == $key && empty($profile_id)) { 416 if ('_umb_shopee_category' == $key) { 417 411 418 $category_id = isset($post_array['ced_shopee_level3_category']) ? $post_array['ced_shopee_level3_category'] : ''; 412 419 $category_id = isset($category_id[0]) ? $category_id[0] : ''; … … 418 425 } 419 426 $profile_data = array(); 420 427 421 428 foreach ($updateinfo as $key => $value) { 422 429 … … 653 660 public function ced_shopee_store_categories($categories, $shopee_shop_id) 654 661 { 655 print_r($categories);656 662 $base_dir = wp_upload_dir()['basedir']; 657 663 $folder_name = $base_dir . '/cedcommerce/Shopee/Categories/'; -
marketplace-integration-for-shopee-and-lazada/trunk/marketplaces/shopee/admin/shopee/lib/class-class-ced-shopee-category.php
r3236554 r3238543 144 144 } 145 145 146 // /**147 // * Function for getting shopee categories148 // *149 // * @since 1.0.0150 // * @param int $shop_id Shopee Shop Id.151 // */152 // public function get_shopee_category($remote_shop_id = '')153 // {154 // if (empty($remote_shop_id)) {155 // return;156 // }157 // $action = 'get_category';158 // $parameters =159 // array(160 // 'shop_id' => $remote_shop_id161 // );162 // $body_param = array();163 // $categories = $this->shopee_remote_request_instance->shopee_remote_request($action, $parameters, $remote_shop_id, 'GET', $body_param);164 // $categories = json_decode($categories['body'], true);165 // if (isset($categories['data']['response']) && !empty($categories['data']['response'])) {166 // return $categories['data'];167 // }168 // }169 146 170 147 /** -
marketplace-integration-for-shopee-and-lazada/trunk/marketplaces/shopee/admin/shopee/lib/class-class-ced-shopee-remote-request.php
r3236554 r3238543 68 68 { 69 69 $url = CED_VALIDATOR_URL; 70 $token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjaGFubmVsIjoid29vY29tbWVyY2Vfc2VhIiwiY2hlY2tvdXRfaW5pdGlhdGVkIjp0cnVlLCJkb21haW4iOiJodHRwczovL2Zpc2hpbmdzdXBwbGllc3RoYWlsYW5kLmNvbSIsImVtYWlsIjoiZGFyZW5AZmlzaGluZ3N1cHBsaWVzdGhhaWxhbmQuY29tIiwibWFya2V0cGxhY2VzIjpbIlNob3BlZSIsIkxhemFkYSJdLCJwbGFuX3BlcmlvZCI6Im1vbnRoIiwicGxhbl90eXBlIjoic2hvcGVlLWxhemFkYS1hZHZhbmNlLW1vbnRobHktVVNELU1vbnRobHkiLCJzdGF0ZSI6ImFjdGl2ZSIsInN1YnNjcmlwdGlvbl9pZCI6IkF6cVVGU1VXQUpmNzhBNlNtIn0.DkNvBS8Z9SkGvd43AXvhozyOOXWYKezyEEjdSwPUFBQ';71 70 if ($method === 'POST') { 72 71 $body = wp_json_encode(array_filter([ … … 75 74 'body' => $parameters, // empty object 76 75 'method' => $method, 77 'domain' => 'https://fishingsuppliesthailand.com',76 'domain' => site_url(), 78 77 ])); 79 78 } else { … … 83 82 'query_params' => $parameters, 84 83 'method' => $method, 85 'domain' => 'https://fishingsuppliesthailand.com',84 'domain' => site_url(), 86 85 ])); 87 86 } … … 90 89 'headers' => [ 91 90 'Content-Type' => 'application/json', 92 'Authorization' => 'Bearer ' . $token,91 'Authorization' => 'Bearer ' . CED_SEA_TOKEN, 93 92 'Product' => 'shopee' 94 93 ], … … 99 98 100 99 $response = wp_remote_post($url, $args); 100 // print_r($response); 101 // die(); 101 102 return $response; 102 103 } … … 142 143 public function ced_remote_products_cap_request($marketplace, $product_ids) 143 144 { 144 $token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjaGFubmVsIjoid29vY29tbWVyY2Vfc2VhIiwiY2hlY2tvdXRfaW5pdGlhdGVkIjp0cnVlLCJkb21haW4iOiJodHRwczovL2Zpc2hpbmdzdXBwbGllc3RoYWlsYW5kLmNvbSIsImVtYWlsIjoiZGFyZW5AZmlzaGluZ3N1cHBsaWVzdGhhaWxhbmQuY29tIiwibWFya2V0cGxhY2VzIjpbIlNob3BlZSIsIkxhemFkYSJdLCJwbGFuX3BlcmlvZCI6Im1vbnRoIiwicGxhbl90eXBlIjoic2hvcGVlLWxhemFkYS1hZHZhbmNlLW1vbnRobHktVVNELU1vbnRobHkiLCJzdGF0ZSI6ImFjdGl2ZSIsInN1YnNjcmlwdGlvbl9pZCI6IkF6cVVGU1VXQUpmNzhBNlNtIn0.DkNvBS8Z9SkGvd43AXvhozyOOXWYKezyEEjdSwPUFBQ';145 145 146 $response = wp_remote_request( 146 147 CED_SHOPEE_PRODUCT_CAP_URL, … … 153 154 'topic' => 'products_count', 154 155 'product_ids' => array_unique($product_ids), 155 'domain' => 'https://fishingsuppliesthailand.com',156 'domain' => site_url(), 156 157 'marketplace' => $marketplace, 157 158 ) … … 162 163 'Accept' => 'application/json', 163 164 'Product' => 'shopee', 164 'Authorization' => 'Bearer ' . $token,165 'Authorization' => 'Bearer ' . CED_SEA_TOKEN, 165 166 // 'Product-type' => 'native', 166 167 ),
Note: See TracChangeset
for help on using the changeset viewer.