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
add_filter('fluent_form_disable_stripe_connect', '__return_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 | |
/** | |
* doSomethingAfterPaymentStatusChange in wppayform | |
* please add this code in theme's functions.php file | |
*/ | |
use WPPayForm\Classes\Models\Submission; | |
use WPPayForm\Classes\Models\OrderItem; | |
function doSomethingAfterPaymentStatusChange($submissionId, $newStatus, $payment_status){ | |
$submissionModel = new Submission(); |
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
/** | |
* Please use this code inside the theme function.php file | |
* or it can throw error on your site | |
*/ | |
/** | |
* this method will register event to WordPress init | |
*/ | |
add_action( 'init', 'SendEmailToLastWeekContacts'); |
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
add_filter('fluentform_editor_vars', function($arr){ | |
$agents['agents'] = '"Agents":["Tahmid","Nayan","Rajon","Numan","Khoyer","Jafor","Kamrul","Mahdi","Rafi","Kamran","Ahsan"],'; | |
$tmp = str_replace(array( '{', '}' ), '', $arr['bulk_options_json']); | |
$data = $agents['agents'].$tmp; | |
$arr['bulk_options_json'] = '{' . $data . '}'; | |
return $arr; | |
}, 10, 1); |
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
add_filter('fluentform_validate_input_item_input_number', function ($errorMessage, $field, $formData, $fields, $form) { | |
$fieldName = 'numeric'; | |
$target_form_id = 13; | |
if($target_form_id != $form->id){ return $errorMessage; } | |
if ($inputValue = \FluentForm\Framework\Helpers\ArrayHelper::get($formData, $fieldName)) { | |
$exist = wpFluent()->table('fluentform_entry_details') |
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 calc(){ | |
let time = document.querySelectorAll('td.ninja_clmn_nm_tunnid'); | |
let hours = 0; | |
let minute = 0; | |
let second = 0; | |
let totalHours = 0; | |
let newMinutes = 0; | |
for(let temp of time){ | |
let [hh,mm,ss] = temp.innerText.split(':'); |
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
add_action('fluentform_submission_inserted', 'addUserToList', 20, 3); | |
function addUserToList($entryId, $formData, $form) | |
{ | |
$contactApi = FluentCrmApi('contacts'); | |
$contact = $contactApi->getContact($formData['id_number']); // Finding the contact from form ID field | |
$list = [3]; // List ID number where you want to assign the user | |
return $contact->attachLists($list); // Adding the contact to a list | |
} |
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('wppayform/validate_data_on_submission_item_quantity',function( $error, $elementId, $element, $form_data){ | |
global $wpdb; | |
$formId = 46; //Please Add Your Form ID here | |
$transactions = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}wpf_order_transactions WHERE form_id = {$formId}" ); | |
$orders = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}wpf_order_items WHERE form_id = {$formId}" ); | |
$orderQuantity = []; | |
$limit = 10; //Please Add Your Total Limit Here | |
for ($i = 0; $i < count($transactions); $i++) { |
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 className = "price_format"; | |
function addSign(){ | |
let val = parseInt(jQuery("td."+className).text()); | |
let value = $("td."+className).html(); | |
if(value.length<1){ | |
jQuery("td."+className).html('No Price'); | |
} | |
else if($("td."+className).is(':empty')){ |