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 | |
/** | |
* Multi-currency for Gravity Forms - allow without OpenExchangeRates API. | |
*/ | |
function gf_multi_currency_allow_without_exchange_rates_api() { | |
?> | |
<script> | |
if ( gform?.addFilter ) { | |
gform.addFilter( 'idea_mcg_exchange_rates', function() { | |
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 | |
/** | |
* Flux checkout - display businesses in the address search. | |
* | |
* Add this JS snippet right before flux-checkout script. | |
*/ | |
add_filter( 'script_loader_tag', function( $tag, $handle, $src ) { | |
if ( 'flux-checkout' !== $handle ) { | |
return $tag; | |
} |
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 | |
/** | |
* Flux checkout - disable address fields for local pickup shipping method. | |
* | |
* @return void | |
*/ | |
function flux_disable_fields_for_local_pickup() { | |
$wc_ajax = filter_input( INPUT_GET, 'wc-ajax' ); | |
if ( ! Iconic_Flux_Core::is_checkout( true ) && 'checkout' !== $wc_ajax ) { |
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( 'gform_stripe_charge_pre_create', function ( $charge, $feed, $submission_data, $form, $entry ) { | |
// Enter the amount in cents. 600 = $6.00. | |
$charge['amount'] = 600; | |
return $charge; | |
}, 10, 5); |
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
/** | |
* Flux checkout birthday field custom validation. | |
*/ | |
add_action( 'wp_footer', function() { | |
?> | |
<script> | |
jQuery( function($) { | |
$( 'form.checkout' ).on( 'blur', '.birthday-field input', function() { | |
// todo change your validation logic here. |
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
/** | |
* Multi-currency for Gravity Forms. | |
* Change currency when tab is changed. | |
*/ | |
jQuery( document ).ready( function () { | |
jQuery( document ).on( 'click', '#e-n-tabs-title-2461', function () { | |
gf_global.gf_currency_config = idea_mcg.all_currencies[ 'CAD' ]; | |
$( ".gform_wrapper input" ).trigger( 'change' ); | |
} ) |
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 | |
/** | |
* Iconic WDS - TY page - change the position of edit timeslot. | |
* | |
* @return void | |
*/ | |
function iconic_wds_change_position_of_edit_timeslot_ty_page() { | |
remove_action( 'woocommerce_order_details_after_order_table', array( 'Iconic_WDS_Edit_Timeslots', 'maybe_display_checkout_fields' ), 10 ); | |
add_action( 'woocommerce_before_thankyou', array( 'Iconic_WDS_Edit_Timeslots', 'maybe_display_checkout_fields' ), 10 ); | |
} |
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 | |
/** | |
* Custom new username for new customer. | |
* | |
* @param string $username Username. | |
* @param string $email Email. | |
* @param array $new_user_args New user args. | |
* @param string $suffix Suffix. | |
* | |
* @return string |
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 | |
/** | |
* Move shiping section for classic theme. | |
* | |
* @param array $step Step data. | |
* | |
* @return void | |
*/ | |
function move_shipping_section_after_shipping_address( $step ) { | |
if ( 'payment' === $step['slug'] ) { |
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 | |
/** | |
* Iconic WDS GCal - do not include the first and last name in the event address. | |
* | |
* @param string $location Location. | |
* @param array $order Order. | |
* | |
* @return string | |
*/ | |
function iconic_wds_gcal_change_location( $location, $order ) { |
NewerOlder