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 monsterinsights_attach_tax_details( $body ){ | |
if ( ! empty( $body ) && is_array( $body ) && array_key_exists( 'ea', $body ) && $body['ea'] === 'Completed Checkout' ) { | |
if ( class_exists( 'WooCommerce' ) && function_exists( 'wc_get_order' ) ) { | |
$order = wc_get_order( $body['el'] ); | |
$items = $order->get_items(); |
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 monsterinsights_custom_use_sku_instead_of_id( $body ) { | |
$numbers = array(); | |
foreach ( $body as $key => $value ) { | |
if ( 0 === strpos( $key, 'pr' ) ) { | |
if ( preg_match( '/\d+/', $key, $matches ) ) { | |
if ( isset( $matches[0] ) ) { | |
$numbers[] = $matches[0]; | |
} |
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 monsterinsights_ssa_track_successfully_booked_appointments( $appointment_id, $data, $data_before, $response ) { | |
if ( ! function_exists( 'ssa' ) ) { | |
return; | |
} | |
if ( empty( $data['status'] ) || $data['status'] !== 'booked' ) { | |
return; | |
} |
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
jQuery( 'document' ).ready( function( $ ){ | |
$('.passster-submit').on('click', function(e){ | |
ps_id = $(this).attr('data-psid'); | |
input = $( "#" + ps_id + ' .passster-password').val(); | |
var form = $(this).parent().parent(); | |
let error = form.find( '.passster-error' ).text(); |
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 monsterinsights_passter_track_correct_code( $input ) { | |
// Check if Passster is active. | |
if ( ! function_exists( 'ps_fs' ) ) { | |
return; | |
} | |
if ( ! function_exists( 'monsterinsights_mp_track_event_call' ) ) { | |
return; | |
} |
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
/** | |
* This would add custom dimension to the admin list inside settings. | |
*/ | |
function monsterinsights_add_dimensions_to_admin_list( $dimensions ) { | |
// Add dimension to array with a unique key 'services' | |
$dimensions['services'] = array( | |
'title' => __( 'Services', 'monsterinsights-dimensions' ), // Label | |
'label' => __( 'Services', 'monsterinsights-dimensions' ), // Description | |
'enabled' => true, |