Changeset 3426266
- Timestamp:
- 12/23/2025 02:29:53 PM (3 months ago)
- Location:
- cocolis
- Files:
-
- 126 added
- 6 edited
-
tags/1.1.5 (added)
-
tags/1.1.5/class (added)
-
tags/1.1.5/class/wc-cocolis-payment.php (added)
-
tags/1.1.5/class/wc-cocolis-webhooks.php (added)
-
tags/1.1.5/languages (added)
-
tags/1.1.5/languages/cocolis-fr_FR.mo (added)
-
tags/1.1.5/languages/cocolis-fr_FR.po (added)
-
tags/1.1.5/readme.txt (added)
-
tags/1.1.5/vendor (added)
-
tags/1.1.5/vendor/autoload.php (added)
-
tags/1.1.5/vendor/bin (added)
-
tags/1.1.5/vendor/cocolis (added)
-
tags/1.1.5/vendor/cocolis/php (added)
-
tags/1.1.5/vendor/cocolis/php/.nvmrc (added)
-
tags/1.1.5/vendor/cocolis/php/.php-cs-fixer.php (added)
-
tags/1.1.5/vendor/cocolis/php/.stoplight.json (added)
-
tags/1.1.5/vendor/cocolis/php/CHANGELOG.md (added)
-
tags/1.1.5/vendor/cocolis/php/README.md (added)
-
tags/1.1.5/vendor/cocolis/php/bootstrap.php (added)
-
tags/1.1.5/vendor/cocolis/php/composer.json (added)
-
tags/1.1.5/vendor/cocolis/php/docs (added)
-
tags/1.1.5/vendor/cocolis/php/docs/Exceptions.md (added)
-
tags/1.1.5/vendor/cocolis/php/docs/Introduction.md (added)
-
tags/1.1.5/vendor/cocolis/php/docs/Rides.md (added)
-
tags/1.1.5/vendor/cocolis/php/docs/Tutorials (added)
-
tags/1.1.5/vendor/cocolis/php/docs/Tutorials/Get-API-KEY.md (added)
-
tags/1.1.5/vendor/cocolis/php/docs/Tutorials/Getting-Started.md (added)
-
tags/1.1.5/vendor/cocolis/php/docs/Webhooks.md (added)
-
tags/1.1.5/vendor/cocolis/php/docs/models (added)
-
tags/1.1.5/vendor/cocolis/php/docs/models/ride (added)
-
tags/1.1.5/vendor/cocolis/php/docs/models/ride/ride-create.v1.json (added)
-
tags/1.1.5/vendor/cocolis/php/docs/models/ride/ride-full.v1.json (added)
-
tags/1.1.5/vendor/cocolis/php/docs/models/user (added)
-
tags/1.1.5/vendor/cocolis/php/docs/models/user/public_user.v1.json (added)
-
tags/1.1.5/vendor/cocolis/php/docs/toc.json (added)
-
tags/1.1.5/vendor/cocolis/php/phpunit.xml (added)
-
tags/1.1.5/vendor/cocolis/php/src (added)
-
tags/1.1.5/vendor/cocolis/php/src/Client.php (added)
-
tags/1.1.5/vendor/cocolis/php/src/Clients (added)
-
tags/1.1.5/vendor/cocolis/php/src/Clients/AbstractClient.php (added)
-
tags/1.1.5/vendor/cocolis/php/src/Clients/RideClient.php (added)
-
tags/1.1.5/vendor/cocolis/php/src/Clients/WebhookClient.php (added)
-
tags/1.1.5/vendor/cocolis/php/src/Curl.php (added)
-
tags/1.1.5/vendor/cocolis/php/src/Errors (added)
-
tags/1.1.5/vendor/cocolis/php/src/Errors/CocolisException.php (added)
-
tags/1.1.5/vendor/cocolis/php/src/Errors/InternalErrorException.php (added)
-
tags/1.1.5/vendor/cocolis/php/src/Errors/NotFoundException.php (added)
-
tags/1.1.5/vendor/cocolis/php/src/Errors/UnauthorizedException.php (added)
-
tags/1.1.5/vendor/cocolis/php/src/Errors/UnprocessableEntityException.php (added)
-
tags/1.1.5/vendor/cocolis/php/src/Models (added)
-
tags/1.1.5/vendor/cocolis/php/src/Models/AbstractModel.php (added)
-
tags/1.1.5/vendor/cocolis/php/src/Models/Ride.php (added)
-
tags/1.1.5/vendor/cocolis/php/src/Models/Webhook.php (added)
-
tags/1.1.5/vendor/cocolis/php/src/Version.php (added)
-
tags/1.1.5/vendor/cocolis/php/tests (added)
-
tags/1.1.5/vendor/cocolis/php/tests/ClientTest.php (added)
-
tags/1.1.5/vendor/cocolis/php/tests/CocolisTest.php (added)
-
tags/1.1.5/vendor/cocolis/php/tests/VersionTest.php (added)
-
tags/1.1.5/vendor/cocolis/php/tests/WrongResPathClient.php (added)
-
tags/1.1.5/vendor/cocolis/php/tests/WrongResPathClientTest.php (added)
-
tags/1.1.5/vendor/cocolis/php/tests/clients (added)
-
tags/1.1.5/vendor/cocolis/php/tests/clients/AbstractClientTest.php (added)
-
tags/1.1.5/vendor/cocolis/php/tests/clients/RideClientTest.php (added)
-
tags/1.1.5/vendor/cocolis/php/tests/clients/WebhookClientTest.php (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/.keep (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_abstractclienttest (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_abstractclienttest/testArray (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_abstractclienttest/testHydrateArray (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_abstractclienttest/testHydrateHash (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_clienttest (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_clienttest/testApiKey (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_clienttest/testApiKeyException (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_clienttest/testAppIdException (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_clienttest/testAuthInfo (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_clienttest/testClient (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_clienttest/testContent (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_clienttest/testEmptyClient (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_clienttest/testPasswordException (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_clienttest/testSignInWithWrongCredentials (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_clienttest/testStaticCreate (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_clienttest/testTokenInvalid (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_clienttest/testTokenNoArgs (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_clienttest/testTokenNoAuth (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_clienttest/testTokenValid (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_rideclienttest (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_rideclienttest/testCreate (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_rideclienttest/testCreateNotImage (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_rideclienttest/testGet (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_rideclienttest/testGetAll (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_rideclienttest/testMatch (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_rideclienttest/testMine (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_rideclienttest/testRemove (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_rideclienttest/testUpdate (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_ridetest (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_ridetest/testArray (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_ridetest/testGetBuyerURL (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_ridetest/testGetSellerURL (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_ridetest/testGetURL (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_ridetest/testObjectException (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_webhookclienttest (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_webhookclienttest/testCreate (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_webhookclienttest/testGet (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_webhookclienttest/testGetAll (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_webhookclienttest/testRemove (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_webhookclienttest/testUpdate (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_wrongrespathclienttest (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/tests_api_wrongrespathclienttest/testPath (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/versiontest (added)
-
tags/1.1.5/vendor/cocolis/php/tests/fixtures/versiontest/testCanBeUsedAsString (added)
-
tags/1.1.5/vendor/cocolis/php/tests/models (added)
-
tags/1.1.5/vendor/cocolis/php/tests/models/RideTest.php (added)
-
tags/1.1.5/vendor/cocolis/php/toc.json (added)
-
tags/1.1.5/vendor/composer (added)
-
tags/1.1.5/vendor/composer/ClassLoader.php (added)
-
tags/1.1.5/vendor/composer/InstalledVersions.php (added)
-
tags/1.1.5/vendor/composer/LICENSE (added)
-
tags/1.1.5/vendor/composer/autoload_classmap.php (added)
-
tags/1.1.5/vendor/composer/autoload_namespaces.php (added)
-
tags/1.1.5/vendor/composer/autoload_psr4.php (added)
-
tags/1.1.5/vendor/composer/autoload_real.php (added)
-
tags/1.1.5/vendor/composer/autoload_static.php (added)
-
tags/1.1.5/vendor/composer/installed.json (added)
-
tags/1.1.5/vendor/composer/installed.php (added)
-
tags/1.1.5/vendor/composer/platform_check.php (added)
-
tags/1.1.5/wc-cocolis-shipping.php (added)
-
trunk/class/wc-cocolis-payment.php (modified) (3 diffs)
-
trunk/class/wc-cocolis-webhooks.php (modified) (4 diffs)
-
trunk/languages/cocolis-fr_FR.mo (modified) (previous)
-
trunk/languages/cocolis-fr_FR.po (modified) (14 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/wc-cocolis-shipping.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cocolis/trunk/class/wc-cocolis-payment.php
r3368324 r3426266 214 214 "title" => $product->get_name(), 215 215 "qty" => $product['qty'], 216 " img" => wp_get_attachment_url($data->get_image_id()),216 "photo_urls" => array(wp_get_attachment_url($data->get_image_id())), 217 217 "height" => (int) $height, 218 218 "width" => (int) $width, … … 221 221 } 222 222 223 $images = [];224 foreach ($arrayproducts as $image) {225 if (!empty($image['img'])) {226 array_push($images, $image['img']);227 }228 }229 230 223 $content_value = (float) ($order->get_total() - $order->get_total_tax() - $order->get_shipping_tax()) * 100; // In cents 231 224 $params = [ 232 225 "description" => "Livraison de la commande : " . implode(", ", $arrayname) . " vendue sur le site marketplace.", 233 226 "external_id" => $order_id, 227 "idempotency_key" =>'cocolis_woocommerce_' . $order_id, 234 228 "from_address" => $from_composed_address, 235 229 "from_postal_code" => $store_postcode, … … 248 242 "volume" => $dimensions, 249 243 "environment" => "objects", 250 "photo_urls" => $images,251 244 "content_value" => $content_value, // In cents 252 245 "rider_extra_information" => "Livraison de la commande : " . implode(", ", $arrayname), -
cocolis/trunk/class/wc-cocolis-webhooks.php
r3150616 r3426266 86 86 $client = $client->getRideClient(); 87 87 $ride = $client->get($ride_id); 88 $ slug = $ride->slug;88 $id = $ride->id; 89 89 $prod = $shipping_class->settings['production_mode'] == "sandbox" ? false : true; 90 90 … … 94 94 $order->add_order_note($note, false); 95 95 96 $ link = $prod ? 'https://cocolis.fr/ride-public/' .97 $slug : 'https://sandbox.cocolis.fr/ride-public/' . $slug;96 $base_url = $prod ? 'https://www.cocolis.fr' : 'https://sandbox.cocolis.fr'; 97 $link = sprintf('%s/ride/public/%s', $base_url, $id); 98 98 99 99 $note = __("Link to ad: ", 'cocolis') . $link; … … 106 106 } 107 107 108 function cocolis_webhook_availabilities_buyer_filled($request) 109 { 110 $data = $request->get_json_params(); 111 $orderid = $data['external_id']; 112 $event = $data['event']; 113 114 if (empty($event) || empty($orderid)) { 115 echo ('Event or order ID missing from Webhook'); 116 exit; 117 } 118 119 $order = new WC_Order($orderid); 120 121 122 if (!empty($order)) { 123 $note = __("The buyer has updated his availability", 'cocolis'); 124 125 // Add the note 126 $order->add_order_note($note, false); 127 } 128 echo json_encode(['success' => true]); 129 exit; 130 } 131 132 function cocolis_webhook_availabilities_seller_filled($request) 133 { 134 $data = $request->get_json_params(); 135 $orderid = $data['external_id']; 136 $event = $data['event']; 137 138 if (empty($event) || empty($orderid)) { 139 echo ('Event or order ID missing from Webhook'); 140 exit; 141 } 142 143 $order = new WC_Order($orderid); 144 145 146 if (!empty($order)) { 147 $note = __("The seller has updated his availability", 'cocolis'); 108 function cocolis_webhook_pickup_slot_accepted_by_sender($request) 109 { 110 $data = $request->get_json_params(); 111 $orderid = $data['external_id']; 112 $event = $data['event']; 113 114 if (empty($event) || empty($orderid)) { 115 echo ('Event or order ID missing from Webhook'); 116 exit; 117 } 118 119 $order = new WC_Order($orderid); 120 121 122 if (!empty($order)) { 123 $note = __("The seller accepted the carrier's pickup slot", 'cocolis'); 124 125 // Add the note 126 $order->add_order_note($note, false); 127 } 128 echo json_encode(['success' => true]); 129 exit; 130 } 131 132 function cocolis_webhook_deposit_slot_accepted_by_recipient($request) 133 { 134 $data = $request->get_json_params(); 135 $orderid = $data['external_id']; 136 $event = $data['event']; 137 138 if (empty($event) || empty($orderid)) { 139 echo ('Event or order ID missing from Webhook'); 140 exit; 141 } 142 143 $order = new WC_Order($orderid); 144 145 146 if (!empty($order)) { 147 $note = __("The buyer has accepted the carrier's delivery slot", 'cocolis'); 148 149 // Add the note 150 $order->add_order_note($note, false); 151 } 152 echo json_encode(['success' => true]); 153 exit; 154 } 155 156 function cocolis_webhook_ride_availabilities_pending($request) 157 { 158 $data = $request->get_json_params(); 159 $orderid = $data['external_id']; 160 $event = $data['event']; 161 162 if (empty($event) || empty($orderid)) { 163 echo ('Event or order ID missing from Webhook'); 164 exit; 165 } 166 167 $order = new WC_Order($orderid); 168 169 170 if (!empty($order)) { 171 $note = __("A carrier offers their services in response to a ride, and confirmation is awaited from the sender and recipient.", 'cocolis'); 148 172 149 173 // Add the note … … 235 259 'permission_callback' => '__return_true' 236 260 )); 237 register_rest_route('cocolis/v1', '/webhook_availabilities_buyer_filled', array( 238 'methods' => 'POST', 239 'callback' => array($this, 'cocolis_webhook_availabilities_buyer_filled'), 240 'permission_callback' => '__return_true' 241 )); 242 register_rest_route('cocolis/v1', '/webhook_availabilities_seller_filled', array( 243 'methods' => 'POST', 244 'callback' => array($this, 'cocolis_webhook_availabilities_seller_filled'), 261 register_rest_route('cocolis/v1', '/webhook_pickup_slot_accepted_by_sender', array( 262 'methods' => 'POST', 263 'callback' => array($this, 'cocolis_webhook_pickup_slot_accepted_by_sender'), 264 'permission_callback' => '__return_true' 265 )); 266 register_rest_route('cocolis/v1', '/webhook_deposit_slot_accepted_by_recipient', array( 267 'methods' => 'POST', 268 'callback' => array($this, 'cocolis_webhook_deposit_slot_accepted_by_recipient'), 269 'permission_callback' => '__return_true' 270 )); 271 register_rest_route('cocolis/v1', '/webhook_ride_availabilities_pending', array( 272 'methods' => 'POST', 273 'callback' => array($this, 'cocolis_webhook_ride_availabilities_pending'), 245 274 'permission_callback' => '__return_true' 246 275 )); -
cocolis/trunk/languages/cocolis-fr_FR.po
r3318609 r3426266 3 3 "Project-Id-Version: Cocolis\n" 4 4 "POT-Creation-Date: 2025-06-27 09:07+0200\n" 5 "PO-Revision-Date: 2025- 06-27 09:08+0200\n"5 "PO-Revision-Date: 2025-12-23 15:21+0100\n" 6 6 "Last-Translator: \n" 7 7 "Language-Team: Cocolis\n" … … 11 11 "Content-Transfer-Encoding: 8bit\n" 12 12 "Plural-Forms: nplurals=2; plural=(n > 1);\n" 13 "X-Generator: Poedit 3. 6\n"13 "X-Generator: Poedit 3.8\n" 14 14 "X-Poedit-Basepath: ..\n" 15 15 "X-Poedit-KeywordsList: __\n" … … 33 33 34 34 #: class/wc-cocolis-payment.php:86 35 msgid "" 36 "Please fill insurance details for Cocolis delivery (refresh if you have " 37 "changed delivery mode)" 38 msgstr "" 39 "Veuillez remplir les détails de l’assurance pour la livraison Cocolis " 40 "(actualiser si vous avez changé de mode de livraison)" 35 msgid "Please fill insurance details for Cocolis delivery (refresh if you have changed delivery mode)" 36 msgstr "" 37 "Veuillez remplir les détails de l’assurance pour la livraison Cocolis (actualiser si vous avez changé de mode de " 38 "livraison)" 41 39 42 40 #: class/wc-cocolis-payment.php:172 … … 66 64 #: class/wc-cocolis-payment.php:335 67 65 msgid "We did not find any related cocolis ads, so the ad was not cancelled." 68 msgstr "" 69 "Nous n’avons pas trouvé d’annonces similaires sur Cocolis, l’annonce n’a " 70 "donc pas été annulée." 66 msgstr "Nous n’avons pas trouvé d’annonces similaires sur Cocolis, l’annonce n’a donc pas été annulée." 71 67 72 68 #: class/wc-cocolis-payment.php:358 … … 83 79 84 80 #: class/wc-cocolis-payment.php:386 85 msgid "" 86 "We have find a related cocolis ad to this order, so the ad was not published." 87 msgstr "" 88 "Nous avons trouvé une annonce Cocolis apparentée à cette commande, l’annonce " 89 "n’a donc pas été publiée." 81 msgid "We have find a related cocolis ad to this order, so the ad was not published." 82 msgstr "Nous avons trouvé une annonce Cocolis apparentée à cette commande, l’annonce n’a donc pas été publiée." 90 83 91 84 #: class/wc-cocolis-webhooks.php:31 … … 110 103 111 104 #: class/wc-cocolis-webhooks.php:171 112 msgid "" 113 "The delivery is cancelled by the carrier. The seller and the buyer are " 114 "informed, their tracking page is updated." 115 msgstr "" 116 "La livraison est annulée par le transporteur. Le vendeur et l’acheteur sont " 117 "informés, leur page de suivi est mise à jour." 105 msgid "The delivery is cancelled by the carrier. The seller and the buyer are informed, their tracking page is updated." 106 msgstr "" 107 "La livraison est annulée par le transporteur. Le vendeur et l’acheteur sont informés, leur page de suivi est mise à " 108 "jour." 118 109 119 110 #: class/wc-cocolis-webhooks.php:195 120 msgid "" 121 "The ride did not find a carrier. Get closer to our support and with " 122 "cocolis.fr" 123 msgstr "" 124 "Le trajet n’a pas trouvé de transporteur. Rapprochez-vous de notre support " 125 "et avec cocolis.fr" 111 msgid "The ride did not find a carrier. Get closer to our support and with cocolis.fr" 112 msgstr "Le trajet n’a pas trouvé de transporteur. Rapprochez-vous de notre support et avec cocolis.fr" 126 113 127 114 #: wc-cocolis-shipping.php:49 … … 138 125 139 126 #: wc-cocolis-shipping.php:118 140 msgid "" 141 "The configuration of the Cocolis module is not correctly configured to fully " 142 "use it." 143 msgstr "" 144 "La configuration du module Cocolis n’est pas correctement configurée pour " 145 "l’utiliser pleinement." 127 msgid "The configuration of the Cocolis module is not correctly configured to fully use it." 128 msgstr "La configuration du module Cocolis n’est pas correctement configurée pour l’utiliser pleinement." 146 129 147 130 #: wc-cocolis-shipping.php:124 148 msgid "" 149 "The address entered in the Woocommerce settings is not properly configured " 150 "to fully use the Cocolis module." 151 msgstr "" 152 "L’adresse saisie dans les paramètres de Woocommerce n’est pas correctement " 153 "configurée pour utiliser pleinement le module Cocolis." 131 msgid "The address entered in the Woocommerce settings is not properly configured to fully use the Cocolis module." 132 msgstr "" 133 "L’adresse saisie dans les paramètres de Woocommerce n’est pas correctement configurée pour utiliser pleinement le " 134 "module Cocolis." 154 135 155 136 #: wc-cocolis-shipping.php:135 … … 198 179 199 180 #: wc-cocolis-shipping.php:171 200 msgid "" 201 "Allows you to calculate the costs in the absence of the width indicated in " 202 "the product sheet." 203 msgstr "" 204 "Permet de calculer les coûts en l’absence de la largeur indiquée dans la " 205 "fiche produit." 181 msgid "Allows you to calculate the costs in the absence of the width indicated in the product sheet." 182 msgstr "Permet de calculer les coûts en l’absence de la largeur indiquée dans la fiche produit." 206 183 207 184 #: wc-cocolis-shipping.php:177 … … 210 187 211 188 #: wc-cocolis-shipping.php:179 212 msgid "" 213 "Allows you to calculate the costs in the absence of the height indicated in " 214 "the product sheet." 215 msgstr "" 216 "Permet de calculer les coûts en l’absence de la hauteur indiquée dans la " 217 "fiche produit." 189 msgid "Allows you to calculate the costs in the absence of the height indicated in the product sheet." 190 msgstr "Permet de calculer les coûts en l’absence de la hauteur indiquée dans la fiche produit." 218 191 219 192 #: wc-cocolis-shipping.php:185 … … 222 195 223 196 #: wc-cocolis-shipping.php:187 224 msgid "" 225 "Allows you to calculate the costs in the absence of the length indicated in " 226 "the product sheet." 227 msgstr "" 228 "Permet de calculer les coûts en l’absence de la longueur indiquée dans la " 229 "fiche produit." 197 msgid "Allows you to calculate the costs in the absence of the length indicated in the product sheet." 198 msgstr "Permet de calculer les coûts en l’absence de la longueur indiquée dans la fiche produit." 230 199 231 200 #: wc-cocolis-shipping.php:193 … … 235 204 #: wc-cocolis-shipping.php:195 236 205 msgid "Required for the ride creation at Cocolis (vendor email)" 237 msgstr "" 238 "Nécessaire pour la création d’une annonce chez Cocolis (email du vendeur)" 206 msgstr "Nécessaire pour la création d’une annonce chez Cocolis (email du vendeur)" 239 207 240 208 #: wc-cocolis-shipping.php:201 … … 244 212 #: wc-cocolis-shipping.php:203 245 213 msgid "Required for the ride creation at Cocolis (landline or cell phone)" 246 msgstr "" 247 "Requis pour la création de trajet chez Cocolis (téléphone fixe ou cellulaire)" 214 msgstr "Requis pour la création de trajet chez Cocolis (téléphone fixe ou cellulaire)" 248 215 249 216 #: wc-cocolis-shipping.php:225 250 217 msgid "The credentials provided are not recognized by the Cocolis API." 251 msgstr "" 252 "Les informations d’identification fournies ne sont pas reconnues par l’API " 253 "Cocolis." 218 msgstr "Les informations d’identification fournies ne sont pas reconnues par l’API Cocolis." 254 219 255 220 #: wc-cocolis-shipping.php:225 … … 263 228 #: wc-cocolis-shipping.php:445 264 229 msgid "" 265 "Cocolis insurance included. <a target='_blank' href='https://www.cocolis.fr/ "266 " static/docs/notice_information_COCOLIS_ACM.pdf'>Notice</a>"267 msgstr "" 268 "Assurance Cocolis incluse. <a target='_blank' href='https://www.cocolis.fr/ "269 " static/docs/notice_information_COCOLIS_ACM.pdf'>Notice d'assurance</a>"230 "Cocolis insurance included. <a target='_blank' href='https://www.cocolis.fr/static/docs/" 231 "notice_information_COCOLIS_ACM.pdf'>Notice</a>" 232 msgstr "" 233 "Assurance Cocolis incluse. <a target='_blank' href='https://www.cocolis.fr/static/docs/" 234 "notice_information_COCOLIS_ACM.pdf'>Notice d'assurance</a>" 270 235 271 236 #: wc-cocolis-shipping.php:461 … … 273 238 msgstr "Assurance complémentaire jusqu'à " 274 239 275 #~ msgid "" 276 #~ "Cocolis has cancelled the ride associated with this order following your " 277 #~ "customer refund." 278 #~ msgstr "" 279 #~ "Cocolis a annulé le trajet associé à cette commande suite à votre " 280 #~ "remboursement client." 281 282 #~ msgid "The public ride URL : " 283 #~ msgstr "L’URL de l’annonce publique : %s " 284 285 #~ msgid "Buyer tracking delivery URL : " 286 #~ msgstr "URL de livraison de suivi de l’acheteur : %s " 287 288 #~ msgid "[Private] Seller tracking delivery URL : " 289 #~ msgstr "[Privé] URL de livraison de suivi du vendeur : " 290 291 #~ msgid "Birth date required for insurance" 292 #~ msgstr "Date de naissance requise pour l’assurance" 240 msgid "Birth date required for insurance" 241 msgstr "Date de naissance requise pour l’assurance" 242 243 msgid "A carrier offers their services in response to a ride, and confirmation is awaited from the sender and recipient." 244 msgstr "" 245 "Un transporteur propose ses services en réponse à une demande de transport, et attend la confirmation de l'expéditeur " 246 "et du destinataire." 247 248 msgid "The buyer has accepted the carrier's delivery slot" 249 msgstr "L'acheteur a accepté le créneau de livraison du transporteur" 250 251 msgid "The seller accepted the carrier's pickup slot" 252 msgstr "Le vendeur a accepté le créneau horaire proposé par le transporteur pour l'enlèvement" -
cocolis/trunk/readme.txt
r3368324 r3426266 4 4 Stable tag: 1.1.3 5 5 Requires at least: 4.7 6 Tested up to: 6.8 6 Tested up to: 6.8.2 7 7 Requires PHP: 5.6.0 8 8 License: GPLv2 or later … … 49 49 50 50 == Changelog == 51 = 1.1.5 = 52 * Fix an issue on installation when creating webhooks 53 * Attach photos to ride objects instead of ride itself 54 51 55 = 1.1.4 = 52 56 * Fix a php warning -
cocolis/trunk/wc-cocolis-shipping.php
r3368324 r3426266 7 7 * Author: Cocolis.fr 8 8 * Author URI: https://www.cocolis.fr 9 * Version: 1.1. 49 * Version: 1.1.5 10 10 * Developer: Alexandre BETTAN, Sebastien FIELOUX 11 11 * Developer URI: https://github.com/btnalexandre, https://github.com/sebfie … … 253 253 $webhooks = $client->getWebhookClient()->getAll(); 254 254 255 $required_events = [ 256 'ride_published', 257 'ride_expired', 258 'offer_accepted', 259 'offer_cancelled', 260 'offer_completed', 261 'pickup_slot_accepted_by_sender', 262 'deposit_slot_accepted_by_recipient', 263 'ride_availabilities_pending' 264 ]; 265 266 $existing_webhooks = []; 255 267 if (!empty($webhooks)) { 256 268 foreach ($webhooks as $webhook) { 257 if (strpos($webhook->url, get_home_url()) !== true) { 269 $existing_webhooks[$webhook->event] = $webhook; 270 } 271 } 272 273 foreach ($required_events as $event) { 274 $webhook_url = get_home_url() . '/wp-json/cocolis/v1/webhook_' . $event; 275 276 if (isset($existing_webhooks[$event])) { 277 $existing_webhook = $existing_webhooks[$event]; 278 if ($existing_webhook->url !== $webhook_url) { 258 279 $client->getWebhookClient()->update( 259 280 [ 260 'event' => $ webhook->event,261 'url' => get_home_url() . '/wp-json/cocolis/v1/webhook_' . $webhook->event,281 'event' => $event, 282 'url' => $webhook_url, 262 283 'active' => true 263 284 ], 264 $ webhook->id285 $existing_webhook->id 265 286 ); 266 287 } 288 } else { 289 $client->getWebhookClient()->create([ 290 'event' => $event, 291 'url' => $webhook_url, 292 'active' => true 293 ]); 267 294 } 268 } else {269 $client->getWebhookClient()->create([270 'event' => 'ride_published',271 'url' => get_home_url() . '/wp-json/cocolis/v1/webhook_ride_published',272 'active' => true273 ]);274 $client->getWebhookClient()->create([275 'event' => 'ride_expired',276 'url' => get_home_url() . '/wp-json/cocolis/v1/webhook_ride_expired',277 'active' => true278 ]);279 $client->getWebhookClient()->create([280 'event' => 'offer_accepted',281 'url' => get_home_url() . '/wp-json/cocolis/v1/webhook_offer_accepted',282 'active' => true283 ]);284 $client->getWebhookClient()->create([285 'event' => 'offer_cancelled',286 'url' => get_home_url() . '/wp-json/cocolis/v1/webhook_offer_cancelled',287 'active' => true288 ]);289 $client->getWebhookClient()->create([290 'event' => 'offer_completed',291 'url' => get_home_url() . '/wp-json/cocolis/v1/webhook_offer_completed',292 'active' => true293 ]);294 $client->getWebhookClient()->create([295 'event' => 'availabilities_buyer_filled',296 'url' => get_home_url() . '/wp-json/cocolis/v1/webhook_availabilities_buyer_filled',297 'active' => true298 ]);299 $client->getWebhookClient()->create([300 'event' => 'availabilities_seller_filled',301 'url' => get_home_url() . '/wp-json/cocolis/v1/webhook_availabilities_seller_filled',302 'active' => true303 ]);304 295 } 305 296 }
Note: See TracChangeset
for help on using the changeset viewer.