This file contains 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( 'wp_mail', function( $args ) { | |
if ( false === strpos( $args['subject'], '<bcc:emails>' ) ) { | |
return $args; | |
} | |
$email = $args['to']; | |
This file contains 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 | |
//update appointment status | |
function __complete_appointment( $appointment_id ) { | |
if ( ! isset( $appointment_id ) ) { | |
return; | |
} | |
$appointment = jet_apb()->db->get_appointment_by( 'ID', $appointment_id ); | |
if ( ! $appointment ) { | |
return; |
This file contains 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_action( 'jet-engine/register-macros', function() { | |
class Get_Store_REGEXP extends Jet_Engine\Modules\Data_Stores\Macros\Get_Store { | |
public function macros_tag() { | |
return 'get_store_regexp'; | |
} |
This file contains 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 | |
/** | |
* To get all the values of the fields in the form, you can use the expression: | |
* jet_fb_request_handler()->get_request() or $context->get_request() | |
\* | |
* If the field is located in the middle of the repeater, then only | |
* jet_fb_request_handler()->get_request(), but $context->get_request() | |
* will return the values of all fields of the current repeater element | |
\* |
This file contains 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_action( 'init', function() { | |
if ( ! function_exists( 'jet_apb' ) ) { | |
return; | |
} | |
if ( ! wp_next_scheduled( 'delete_old_appointments' ) ) { | |
wp_schedule_event( time(), 'daily', 'delete_old_appointments' ); |
This file contains 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_action( | |
'jet-form-builder/gateways/before-create', | |
function ( $rest_action ) { | |
if ( ! is_a( | |
$rest_action, | |
\JFB_Modules\Gateways\Paypal\Api_Actions\Pay_Now_Action::class | |
) ) { | |
return; |
This file contains 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_action( 'jet-engine/register-macros', function(){ | |
class Get_Query_Count_Macro extends \Jet_Engine_Base_Macros { | |
public function macros_tag() { | |
return 'get_query_count'; | |
} | |
This file contains 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( 'jet-search/template/pre-get-meta-field', function($value, $meta, $post){ | |
$meta_key = $meta['meta_key'] ?? ''; | |
if( false === strpos( $meta_key, 'post_terms__' ) ){ | |
return $value; | |
} | |
$tax_slug = ( explode('post_terms__', $meta_key) )[1]; |
This file contains 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( 'jet-engine/listings/dynamic-field/sanitize-output', '__return_false' ); |
This file contains 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_action( 'jet-engine/register-macros', function(){ | |
class Get_Ancestor extends \Jet_Engine_Base_Macros { | |
public function macros_tag() { | |
return 'get_ancestor'; | |
} |