Changeset 3425260
- Timestamp:
- 12/22/2025 11:02:20 AM (3 months ago)
- Location:
- fuvar-hu-api/trunk
- Files:
-
- 2 edited
-
inc/shipping_method.php (modified) (8 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
fuvar-hu-api/trunk/inc/shipping_method.php
r3259600 r3425260 484 484 $provider = "mpl"; 485 485 $show_for = "fuvarhu_csp"; 486 $packli_service_id = [2]; 486 487 } 487 488 … … 490 491 $provider = "mpl"; 491 492 $show_for = "fuvarhu_pop"; 493 $packli_service_id = [3]; 492 494 } 493 495 … … 496 498 $provider = "mpl"; 497 499 $show_for = "fuvarhu_pos"; 500 $packli_service_id = [4]; 498 501 } 499 502 … … 502 505 $provider = "dpd"; 503 506 $show_for = "fuvarhu_aut_dpd"; 507 $packli_service_id = [8]; 504 508 } 505 509 … … 508 512 $provider = "pck"; 509 513 $show_for = "fuvarhu_aut_pck"; 514 $packli_service_id = [10,9]; 510 515 } 511 516 … … 514 519 $provider = "fxp"; 515 520 $show_for = "fuvarhu_aut_fxp"; 521 522 $packli_service_id = [14]; 516 523 } 517 524 … … 520 527 } 521 528 522 $response = wp_remote_post("https://backend.fuvar.hu/graphql/public/",[ 529 $response = wp_remote_get(add_query_arg([ 530 'provider_service_ids' => $packli_service_id, 531 'page' => 0, 532 'limit' => 10000 533 ],"https://app.packli.hu/api/v3/provider-places"),[ 523 534 'headers' => [ 524 535 'Accept: application/json', 525 536 'Content-Type: application/json' 526 537 ], 527 'body' => ['query' => 'query getMplPoints($type: String! $search: String $provider: String) {collectorpoints(limit: 0, page: 1, type: $type, search: $search, provider: $provider) {data {id point_id title zip city address}}}', 'variables' => [528 'type' => $selected,529 'search' => '',530 'provider' => $provider531 ]]532 538 ]); 533 539 … … 541 547 $points = json_decode($mpl_points,true); 542 548 543 if(!isset($points['data']) || !isset($points['data']['collectorpoints']) || !isset($points['data']['collectorpoints']['data'])){549 if(!isset($points['data'])){ 544 550 echo $pointserror; 545 551 return; 546 552 } 547 553 548 $points = $points['data'] ['collectorpoints']['data'];554 $points = $points['data']; 549 555 550 556 foreach ($points as $key => $value) { 551 $options[$value[" title"]] = $value["city"]." - ".$value["title"]." (".$value["address"].")";557 $options[$value["name"]] = $value["city"]." - ".$value["name"]." (".$value["address"].")"; 552 558 } 553 559 -
fuvar-hu-api/trunk/readme.txt
r3259600 r3425260 1 === Fuvar.huSzállítási Módok ===1 === Packli (Fuvar.hu) Szállítási Módok === 2 2 Contributors: fuvarhu 3 3 Tags: shipping, orders 4 4 Requires at least: 5.6.1 5 5 Tested up to: 6.1 6 Stable tag: 2.1.16 Stable tag: 3.0.1 7 7 Requires PHP: 8.1 8 8 License: GPLv2 or later
Note: See TracChangeset
for help on using the changeset viewer.