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 ) { |
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
add_action( | |
'wp_head', | |
function() { | |
if ( is_checkout() ) { | |
?> | |
<style> | |
/* Hide the other express checkout containers generated by other gateway plugins. */ | |
.wc-stripe-banner-checkout, | |
.wc-ppcp-express-checkout { | |
display: none !important; |
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 // Dont add this link to functions.php | |
/** | |
* Iconic WDS - Disable all dates for specific product. | |
* | |
* @param array $available_dates Available dates. | |
* @param string $format Date format. | |
* @param bool $ignore_slots Ignore slots. | |
* | |
* @return array | |
*/ |
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 - disable autofill. | |
* | |
* @return void | |
*/ | |
function iconic_flux_disable_autofill_address() { | |
if ( ! is_checkout() ) { | |
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 | |
// Create a custom merge tag for gravity forms. | |
add_filter( 'gform_custom_merge_tags', 'pj_add_custom_merge_tags', 10, 4 ); | |
function pj_add_custom_merge_tags( $merge_tags, $form_id, $fields, $element_id ) { | |
$merge_tags[] = array( 'label' => 'Today date(Y-M-D)', 'tag' => '{custom_today_ymd}' ); | |
return $merge_tags; | |
} | |
// Add a custom merge tag to the list of available merge tags in the form editor. | |
add_filter( 'gform_merge_tags', 'pj_add_custom_merge_tag', 10, 4 ); |
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 // do not include this line to functions.php | |
/** | |
* Flux checkout - hide shipping section for details and address step. | |
*/ | |
function flux_hide_shipping_section_for_details_address_step() { | |
if ( ! is_checkout() ) { | |
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
/** | |
* Iconic WDS - compatiblity with CartFlows. | |
*/ | |
add_action( | |
'wp_footer', | |
function() { | |
if ( ! is_checkout() ) { | |
return; | |
} | |
?> |
NewerOlder