PluginProbe
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments / 2.6.1
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments v2.6.1
4.7.2 4.7.1 4.7.0 4.6.6 4.6.5 4.6.4 4.6.3 4.6.2 4.6.1 4.6.0 4.5.1 4.5.0 4.4.2 4.4.1 4.4.0 4.3.3 4.3.2 4.3.1 4.3.0 4.2.3 4.2.2 4.2.1 1.0.3 1.0.4 1.0.5 All 281 releases
← All changes | app/src/Controllers/Web/WebhookController.php +5 -2 4.7.12.6.1 View file →
@@ -3,8 +3,9 @@
3 3 namespace SureCart\Controllers\Web;
4 4
5 5 use SureCart\Models\IncomingWebhook;
6 6 use SureCart\Models\RegisteredWebhook;
7 +use SureCartCore\Responses\RedirectResponse;
7 8 use SureCartVendors\Psr\Http\Message\ResponseInterface;
8 9
9 10 /**
10 11 * Handles webhooks
@@ -35,9 +36,10 @@
35 36
36 37 // test it.
37 38 $registered->test();
38 39
39 - return \SureCart::redirect()->to( esc_url_raw( admin_url( 'admin.php?page=sc-dashboard' ) ) );
40 + // respond back.
41 + return ( new RedirectResponse( $request ) )->back();
40 42 }
41 43
42 44 /**
43 45 * Update the webhook.
@@ -59,9 +61,10 @@
59 61 if ( is_wp_error( $updated ) ) {
60 62 wp_die( wp_kses_post( $updated->get_error_message() ) );
61 63 }
62 64
63 - return \SureCart::redirect()->to( esc_url_raw( admin_url( 'admin.php?page=sc-dashboard' ) ) );
65 + // redirect back.
66 + return ( new RedirectResponse( $request ) )->back();
64 67 }
65 68
66 69 /**
67 70 * This deletes and recreates the webhook