Commit Graph

29 Commits

Author SHA1 Message Date
claudiulodro b0b3ddccb0 remove extra parens 2018-11-02 10:21:30 -07: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
Brent Shepherd d9158a8c0e Add WC_Queue and WC()->queue() wrapper for accessing it
To take care of instantiating a canonical job queue for use across
all of WooCommerce, and by 3rd party code.

Also use this new API for enqueuing webhooks instead of raw Action
Scheduler APIs.
2018-07-31 12:21:07 +10:00
Brent Shepherd 3993126f78 Set array keys on scheduled webhook action
To make it clearer in the database what the args refer to, e.g.
instead of storing the scheduled action's args as:

[1,123]

This patch changes it so that the args are stored as:

["webhook_id":1,"arg":123]

This has no impact on callbacks on the hooks, they are still passed
the args as normal.
2018-07-06 15:41:22 +10:00
Brent Shepherd 9aee2fa97b Add webhook group for scheduled aysnc deliveries
This will make it possible in future to run queues specifically for
delivering webhooks, instead of deliering webhooks in the same queue
as other actions, like scheduled payments, emails or other actions
scheduled by other plugins. This can be used to provide better
control over webhook delivery, which allows for sending webhooks more
quickly than if they are only included in batches of other actions.
2018-07-06 15:41:22 +10:00
Brent Shepherd f28f809edb Use Action Scheduler for async webhook delivery 2018-07-06 15:41:22 +10:00
TheDramatist a42acd438d PHPDoc @throws Added (#20381) 2018-06-05 13:30:16 +01:00
Claudio Sanches a597ba3b84 Use short ABSPATH check 2018-03-08 18:31:01 -03:00
Rodrigo Primo 211ec9b896 phpcs fixes 2018-01-31 11:22:33 -02:00
Mike Jolley b230d6be4c Error checking 2018-01-31 10:40:06 +00:00
Claudio Sanches b1fd3134c3 Introduces woocommerce_webhook_process_delivery hook 2017-12-01 14:33:30 -02:00
Claudio Sanches bf6436e0c9 Cache search webhooks results and added method to count webhooks by status 2017-11-07 17:42:14 -02:00
Claudio Sanches cf95a67f7c Added function to get webhook instance 2017-11-07 16:10:12 -02:00
Claudio Sanches 7043245cb5 Merge branch 'master' into feature/webhook-crud 2017-11-07 12:42:28 -02:00
Claudio Sanches b775074900 Fixed includes/wc-webhook-functions.php and removed debug 2017-10-10 12:59:04 -03:00
Claudio Sanches b62b954f19 Small change to test PHPCS into Travis CI 2017-10-09 17:32:53 -03:00
Claudio Sanches 8d8ffb6e9e Included @since tag to wc_is_webhook_valid_topic() 2017-08-18 13:41:51 -03:00
Claudio Sanches e31da15959 Improve test_wc_load_webhooks() checking when returns false 2017-08-17 12:32:30 -03:00
Claudio Sanches 8c120da100 Test webhook functions 2017-08-17 12:29:34 -03:00
Claudio Sanches bc95b1c153 Moved wc_is_webhook_valid_topic to wc-webhook-functions.php 2017-08-17 12:06:45 -03:00
Claudio Sanches dcf3e27155 New helpers to load webhooks 2017-08-17 10:51:20 -03:00
Claudio Sanches 53552f8028 Require create webhook secret in the REST API 2016-06-27 21:55:54 -03:00
Claudio Sanches df075875b4 Improved wc_webhook_generate_secret() 2016-06-24 14:32:06 -03:00
Claudio Sanches fd5d1e2085 Improve webhook secret generation in admin screen 2016-06-24 12:22:07 -03:00
Claudio Sanches 47ef7e17a1 Created new function to generate webhook secrets based on the user ID and username, closes #10881 2016-05-11 13:14:00 -03:00
Claudio Sanches 5893875b0c Removed period for file headers 2015-11-03 11:53:50 -02:00
Claudio Sanches ee30b5b308 Fixed php docs standards 2015-11-03 11:31:20 -02:00
Claudio Sanches b247997bd2 Created method to get the webhook statuses 2014-12-16 18:54:48 -02:00