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
const ddTrace = require('dd-trace'); | |
module.exports = function (app) { | |
if (process.env.LOCAL) return; | |
const tracer = ddTrace.init({ | |
tags: ['app:fx-' + process.env.NODE_ENV], | |
env: process.env.NODE_ENV, | |
logInjection: true | |
}); |
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
function getRequestData() | |
{ | |
if( empty($this->request) ) | |
$this->request = $this->getRequest(); | |
$post = $this->request->getPost()->toArray(); | |
$get = $this->request->getQuery()->toArray(); | |
$headers = $this->request->getHeaders()->toArray(); | |
$body = $this->request->getContent() !== '' | |
? json_decode($this->request->getContent(), true) |
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 | |
function fx_layout_content() | |
{ | |
load_template( FX_Layouts::$main_template ); | |
} | |
function fx_layout_base() | |
{ | |
return FX_Layouts::$base; |
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
public function add_uploaded_file( $name, $file_path ) { | |
$mail = $this->contact_form->prop('mail'); | |
$this->uploaded_files[$name] = $file_path; | |
if ( empty( $this->posted_data[$name] ) ) { | |
$this->posted_data[$name] = basename( $file_path ); | |
$mail['attachments'] .= "[$name]\n"; | |
$this->form->set_properties( array('mail' => $mail) ); | |
} |
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
function direct_free_downloads_button($button) | |
{ | |
global $product; | |
if( $product->is_downloadable() AND $product->get_price() == 0 ) | |
{ | |
$files = $product->get_files(); | |
$files = array_keys($files); | |
$download_url = home_url('?download_file='.$product->id.'&key='.$files[0].'&free=1' ); |