Commit Graph

87 Commits

Author SHA1 Message Date
Gerhard 77309a86c3 When dynamic choosing API class, the comparison should be !== as the lastest version has no v3 in the class name. 2018-11-15 11:15:42 +02:00
claudiulodro 0fa1448cfe Topic blacklist 2018-11-02 10:21:30 -07:00
Claudio Sanches f765b47cbf Make easy to register new REST API versions into webhooks
Closes #21697
2018-10-29 19:31:47 -03:00
JD 0871ad8627
Update class-wc-webhook.php 2018-10-03 21:38:53 +01:00
JD b0b2b34884
Avoid treating HTTP 301 and 302 Codes as Failures
As per:

https://github.com/woocommerce/woocommerce/issues/21490

Change the definition of a Webhook Delivery Failure to exclude HTTP/301 and HTTP/302 responses. This allows webhook handlers (such as Google Apps Script) to avoid breaching failure limits and disabling webhooks.
2018-10-03 16:40:49 +01:00
Mike Jolley 59866b679c Do not log body for webhooks unless debug mode is turned on. 2018-04-30 16:24:23 +01:00
Claudio Sanches 7f5e5a3ca4 Short ABSPATH check in includes/class-wc-webhook.php 2018-03-21 00:22:04 -03:00
Claudio Sanches 16f3858472 Fixed "end if" comment 2018-03-19 20:22:39 -03:00
Rodrigo Primo c2c1501acc PHPCS fixes in includes/class-wc-webhook.php 2018-03-13 08:35:25 -03:00
Mike Jolley 8631e981e1
Merge pull request #17987 from woocommerce/feature/12439-process-delivery-hook
Introduces woocommerce_webhook_process_delivery hook
2017-12-04 13:08:42 +00:00
Claudiu Lodromanean 19969636f3
Merge pull request #17985 from woocommerce/refactor/12439-improve-duration
Improve webhook delivery duration
2017-12-01 14:33:49 -08:00
Claudiu Lodromanean 6b8b93d66c
Merge pull request #17984 from woocommerce/refactor/12439-falied-delivery
Updated webhook failed delivery code and introduced new hook
2017-12-01 10:28:25 -08:00
Claudiu Lodromanean 1a2a332f54
Merge pull request #17939 from woocommerce/feature/17734
Apply Webhooks CRUD into REST API
2017-12-01 10:07:21 -08:00
Claudio Sanches b1fd3134c3 Introduces woocommerce_webhook_process_delivery hook 2017-12-01 14:33:30 -02:00
Claudio Sanches d6f54afbe5 Improve webhook delivery duration
Improved to conside the amount of time spent gathering all data and time sending request.

Closes #17010
2017-12-01 13:48:31 -02:00
Claudio Sanches 022f9a10a3 Updated webhook failed delivery code and introduced new hook 2017-12-01 12:08:13 -02:00
Claudio Sanches 01b3f2bac4 Trigger webhook when delivery URL is changed 2017-11-30 16:48:16 -02:00
Claudio Sanches 4d9203b841 Soft deprecated webhook deliveries REST API endpoints 2017-11-30 16:20:20 -02:00
Claudio Sanches 9b5d5b684b Fixed coding standards 2017-11-30 16:05:36 -02:00
Gerhard Potgieter 1e887c5afa Add deprecated param to docbloc 2017-11-20 08:13:55 +02:00
Gerhard Potgieter 0360801994 Add deprecated param to deprecated functions, use wc_print_r instead of print_r, PHPCS fix 2017-11-20 08:11:10 +02:00
Gerhard Potgieter ba451f68e4 Remove unused filter and deprecate get_delivery_log function. 2017-11-17 14:43:44 +02:00
Gerhard Potgieter 2ec3e5d045 Return url when requesting logs 2017-11-17 09:41:14 +02:00
Gerhard Potgieter 3adb2d8fce Use this as class reference, use info method for logging, use consistant log filename. 2017-11-17 09:03:32 +02:00
Gerhard Potgieter b11ab6d8d6 Convert comments to wc_logger logging, remove and deprecate unused functions and introduce a wc_get_log_file_name helper function. Still a couple of todos left regarding deprecating or removing filters related to comments. 2017-11-10 12:20:59 +02:00
Gerhard Potgieter e61160fabe PHPCS fixes for class-wc-webhook.php 2017-11-08 14:46:23 +02:00
Claudio Sanches b93a9732df Fixed validation of set_status and set_topic 2017-08-17 18:36:42 -03:00
Claudio Sanches 568aae5e0f Validate webhook topic before set 2017-08-17 17:57:09 -03:00
Claudio Sanches bf674bce6e Validate webhook status 2017-08-17 17:54:31 -03:00
Claudio Sanches d02a7655fd Allow numeric api version on Webhook CRUD 2017-08-17 12:18:32 -03:00
Claudio Sanches 00185c5911 Webhook data store 2017-08-17 00:08:32 -03:00
Claudio Sanches 256ad31130 Include missing date methods on Webhook CRUD 2017-08-16 21:40:31 -03:00
Claudio Sanches 20291a6305 Webhook CRUD 2017-08-16 21:20:02 -03:00
Claudio Sanches 069cf21c08 Use new CRUD actions to trigger Webhooks
Closes #16378
2017-08-10 13:56:17 -03:00
Mike Jolley 1e7b83b813 Cleanup meta after ping 2017-06-16 13:56:50 +01:00
Claudio Sanches 58b22f343a Fixed unicode characters when saving webhook delivery logs
Closes #15288
2017-06-05 15:25:29 -03:00
Mike Jolley cac5b33553 Merge pull request #14639 from atimmer/stories/webhook-public-build_payload
Change build_payload from private to public
2017-05-18 13:15:53 +01:00
claudiulodro 027e7b1f94 Add restored webhook 2017-04-27 11:44:57 -07:00
Anton Timmermans 82c2a2dd86
Change build_payload from private to public 2017-04-24 13:22:47 +02:00
Claudio Sanches c89cb04194 Fixed api version compare for #13872 2017-04-03 21:41:00 -03:00
Claudio Sanches 4922e17876 Include missing REST API v2 from webhooks options. 2017-04-02 03:07:09 -03:00
Claudio Sanches 59c2849736 Changed version 2.7 to 3.0 2017-03-15 13:36:53 -03:00
Brent Shepherd 4147935990 Fix undefined index notice in WC_Webhook 2017-02-02 12:52:00 -08:00
Claudio Sanches 461e2486d2 [2.6] Fixed when should deliver wp_trash_post 2016-11-24 16:07:32 -02:00
Claudio Sanches 5a0c815623 Allow set data using legacy API v3 and WP API integration in webhooks 2016-11-22 22:59:55 -02:00
Claudio Sanches 30f1d0bf66 Allow set api version 2016-11-22 21:49:04 -02:00
Aristeides Stathopoulos f2730eea02 WordPress.WhiteSpace.ControlStructureSpacing.BlankLineAfterEnd 2016-08-27 08:57:05 +03:00
Aristeides Stathopoulos 82f3cc221e WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeOpenParenthesis 2016-08-27 07:23:02 +03:00
Aristeides Stathopoulos ec8a0b288b PHPCS: WordPress.Arrays.ArrayDeclaration.NoCommaAfterLast 2016-08-27 05:08:49 +03:00
Claudio Sanches 9da3f79f41 Introduces the woocommerce_webhook_order_payload_filters filter 2016-08-18 13:22:13 -03:00