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 | |
use StellarPay\Core\ValueObjects\WebhookEventType; | |
use StellarPay\Core\Webhooks\EventProcessor; | |
use StellarPay\Core\Webhooks\EventResponse; | |
use StellarPay\PaymentGateways\Stripe\Webhook\WebhookRegisterer; | |
use function StellarPay\Core\container; | |
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('woocommerce_checkout_fields', 'add_custom_checkout_field'); | |
function add_custom_checkout_field($fields) { | |
$fields['billing']['billing_custom_field'] = array( | |
'type' => 'text', | |
'label' => __('BTW-nummer'), | |
'required' => false, // has to be false, otherwise it's always checked dispite of country selected! | |
'class' => array('form-row-wide', 'tax-number-class'), | |
'label_class' => array('tax-number-label'), | |
'clear' => 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
/** | |
* Flux checkout - move company field to billing step. | |
*/ | |
add_filter( 'flux_checkout_details_fields', function( $fields ) { | |
foreach ( $fields as $key => $field ) { | |
if ( $field === 'billing_company' ) { | |
unset( $fields[ $key ] ); | |
} | |
} |
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
/** | |
* Iconic Quickview - Translate text. | |
*/ | |
function iconic_qv_wpml_translate_text() { | |
global $jckqv; | |
if ( empty( $jckqv ) ) { | |
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
<?php | |
/** | |
* Flux checkout: disable T&C link accordion. | |
*/ | |
function iconic_flux_disable_tnc_link_accordion() { | |
?> | |
<script> | |
jQuery(document).ready(function($) { | |
jQuery('.woocommerce-terms-and-conditions-link').removeClass('woocommerce-terms-and-conditions-link'); | |
}); |
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 | |
/** | |
* Iconic WDS - Modify the max dates setting for a specific product. | |
*/ | |
iconic_wds_modify_wds_max_dates_setting(); | |
add_action('wp_loaded', 'iconic_wds_modify_wds_max_dates_setting', 11); | |
function iconic_wds_modify_wds_max_dates_setting() { | |
global $iconic_wds; | |
if ( ! isset( $iconic_wds ) ) { |
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 | |
/** | |
* Iconic WDS - Change next day cutoff for fridays. | |
*/ | |
function iconic_change_next_day_cutoff() { | |
global $iconic_wds; | |
$day = '5'; // Monday = 1, Tuesday = 2, Wednesday = 3, Thursday = 4, Friday = 5, Saturday = 6, Sunday = 7 | |
// set cut off to 14:00 for fridays. |
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 | |
// Iconic WDS - Disable ASAP timeslot for other than today's date | |
function iconic_wds_filter_out_asap_timeslot( $slots, $ymd ) { | |
$date_ymd = filter_input( INPUT_POST, 'date', FILTER_SANITIZE_FULL_SPECIAL_CHARS ); | |
if ( $date_ymd !== wp_date( 'Ymd' ) ) { | |
$slots = array_filter( $slots, function( $slot ) { | |
return empty( $slot['asap'] ); | |
} ); |
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 | |
/** | |
* Flux checkout - Reverse order of street number and address fields. | |
* | |
* @param array $fields The checkout fields. | |
* | |
* @return array | |
*/ | |
function flux_reverse_order_of_street_number_address_fields( $fields ) { | |
$fields['billing']['billing_street_number']['priority'] = 60; |
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 | |
/** | |
* Flux checkout - Update button text. | |
* | |
* @return void | |
*/ | |
add_action( 'wp_footer', function() { | |
if ( ! is_checkout() ) { | |
return; | |
} |
NewerOlder