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 - Auto add product to cart if cart is empty and user visits checkout page. | |
| * | |
| * @return void | |
| */ | |
| function auto_add_product_to_cart() { | |
| if ( is_checkout() && WC()->cart->is_empty() ) { | |
| WC()->cart->add_to_cart( 10 ); | |
| } |
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 - add custom code to the Thank you page. | |
| * | |
| * @return void | |
| */ | |
| function iconic_flux_add_custom_code_thankyou_page() { | |
| if ( ! class_exists( 'Iconic_Flux_Core' ) || ! Iconic_Flux_Core::is_thankyou_page() ) { | |
| 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 hide address. | |
| * | |
| * @param array $fields Fields. | |
| * | |
| * @return array | |
| */ | |
| function flux_hide_address_fields_for_digital_products( $fields ) { |
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 - update Fees description when the selected day is a Saturday. | |
| * | |
| * @param string $label Label. | |
| * | |
| * @return string | |
| */ | |
| function iconic_wds_update_fee( $label ) { | |
| if ( empty( $_POST['post_data'] ) ) { |
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 Account Pages - compatiblity with Divi builder. | |
| * | |
| * @param WP_Query $q Query. | |
| * | |
| * @return void | |
| */ | |
| function iconic_wap_divi_compatibility( $q ) { | |
| if ( empty( $_GET['et_fb'] ) ) { |
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 | |
| add_action( 'wp_footer', function () { ?> | |
| <script> | |
| jQuery( document.body ).on( 'updated_checkout', iconic_wds_toggle_timeslot ); | |
| jQuery( document ).ready( iconic_wds_toggle_timeslot ); | |
| function iconic_wds_toggle_timeslot() { | |
| var selected_shipping_method = jQuery( "#shipping_method :radio:checked" ).val(); | |
| if ( !selected_shipping_method ) { |
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 - compatibility with Stripe Gpay/Apple Pay. | |
| * Disable WDS checks when the payment is being made from Express checkout. | |
| * | |
| * @return void | |
| */ | |
| function iconic_wds_compat_stripe_gpay() { | |
| $wc_ajax = filter_input( INPUT_GET, 'wc-ajax' ); |
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
| p.form-row>input[type=checkbox]:before , | |
| p.form-row>input[type=checkbox]:after { | |
| display: inline-block; | |
| box-sizing:content-box; | |
| } | |
| p.form-row>input[type=checkbox]+label { | |
| display: inline; | |
| } |
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 - auto open order review section. | |
| * | |
| * @return void | |
| */ | |
| function flux_auto_open_order_review_mobile() { | |
| if ( ! is_checkout() ) { | |
| 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 | |
| /** | |
| * Iconic WDS - Fix for Divi checkout builder/Elementor builder. | |
| * Adds shortcode [iconic_wds_fields] | |
| * and removes the default position of delivery slots. | |
| * | |
| * @return void | |
| */ | |
| function iconic_wds_remove_default_fields_add_shortcode() { | |
| global $iconic_wds; |