This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Your class to construct the metabox output | |
* | |
* Class must have a public function `handle` that can receive the $extraValue | |
* and a NF submission. | |
* | |
* Output of handle method is a \NinjaForms\Includes\Entities\MetaboxOutputEntity with two properties: | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('nf_react_table_extra_value_keys', 'nfAddMetabox'); | |
/** | |
* Add a metabox constructor to the react.js submissions page | |
* | |
* @param array $metaboxHandlers | |
* @return array | |
*/ | |
function nfAddMetabox(array $metaboxHandlers): array |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$rawResponse = wp_remote_request($this->url, $this->httpArgs); | |
if (is_wp_error($rawResponse)) { | |
$this->responseData->setType('error'); | |
$this->responseData->setMessage($rawResponse->get_error_message()); | |
} else { | |
$this->responseData->setResponse(json_encode($rawResponse)); | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace NFAmoCrm\EmailCRM\AmoCrm\Handlers; | |
use NFMailchimp\EmailCRM\Shared\Entities\ResponseData; | |
/** | |
* Make an HTTP request | |
* | |
*/ |