New. Code. Amelia integration#797
Conversation
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (57.57%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## dev #797 +/- ##
============================================
+ Coverage 25.77% 25.97% +0.20%
- Complexity 5591 5622 +31
============================================
Files 264 265 +1
Lines 24076 24150 +74
============================================
+ Hits 6206 6274 +68
- Misses 17870 17876 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
||
| public function getDataForChecking($argument) | ||
| { | ||
| $raw = file_get_contents('php://input'); |
There was a problem hiding this comment.
Why used the stream instead of $_POST? Explain, please.
There was a problem hiding this comment.
Amelia sends data in the "application/json" format. $_POST does not intercept this.
| use Cleantalk\ApbctWP\Variables\Get; | ||
| use PHPUnit\Framework\TestCase; | ||
|
|
||
| class ApbctAmeliaPhpInputStub |
There was a problem hiding this comment.
Every class must be in a separate file.
AntonV1211
left a comment
There was a problem hiding this comment.
Shouldn't I write a condition for skipping the general spam check, since now the check goes through the integration hook?
| public function doBlock($message) | ||
| { | ||
| remove_action('wp_ajax_wpamelia_api', array('AmeliaBooking\\Plugin', 'wpAmeliaApiCall')); | ||
| remove_action('wp_ajax_nopriv_wpamelia_api', array('AmeliaBooking\\Plugin', 'wpAmeliaApiCall')); |
There was a problem hiding this comment.
Why this logic of removing hooks?
https://app.doboard.com/1/task/49412