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 | |
| /** | |
| * Prevent Flux Stepper from advancing to the next step if EU VAT number is invalid. | |
| */ | |
| add_filter( 'flux_checkout_check_for_inline_errors', 'flux_validate_eu_vat_number', 10, 1 ); | |
| function flux_validate_eu_vat_number( $messages ) { | |
| // Check if fields were sent in the AJAX request | |
| if ( ! isset( $_POST['fields'] ) || ! is_array( $_POST['fields'] ) ) { | |
| return $messages; | |
| } |
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 Orderable time slot and date to a given order ID. | |
| * | |
| * @param int $order_id The WooCommerce Order ID. | |
| * @param string $date The Date (e.g., '2026-02-26'). | |
| * @param string $time The Time (e.g., '10:00 - 11:00' or '10:00'). | |
| * @param string $service_type The Service Type (e.g., 'delivery' or 'pickup'). Default 'delivery'. | |
| * @return bool True if successful, false otherwise. | |
| */ |
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 | |
| /** | |
| * Restrict Orderable service dates if a specific product is in the cart. | |
| * | |
| * @param array|bool $service_dates The currently available service dates. | |
| * @param string $type The service type ('delivery' or 'pickup'). | |
| * @param Orderable_Location_Single $location The location instance. | |
| * @return array|bool | |
| */ | |
| function orderable_restrict_service_dates( $service_dates, $type, $location ) { |
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 Product configurator - compatibility with Avada theme's swatches. | |
| */ | |
| add_action( 'wp_footer', function() { | |
| ?> | |
| <script> | |
| jQuery(document).ready(function($) { | |
| jQuery('.avada-color-select').click(function() { | |
| const siblings = jQuery(this).siblings('.avada-select-parent'); |
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
| /** | |
| * Orderable Pro: Disable auto select date time. | |
| */ | |
| function orderable_pro_disable_auto_select_date_time() { | |
| ?> | |
| <script> | |
| jQuery(document).ready(function($) { | |
| wp.hooks.addFilter('orderable_pro_timing_disable_auto_select_date_time','snippets', function() { | |
| return 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
| <?php | |
| add_filter( 'iconic_wds_force_load_reservation_calendar_assets', '__return_true' ); | |
| /** | |
| * Trigger custom event when .ays-pb-modal becomes visible. | |
| */ | |
| add_action( 'wp_footer', function() { | |
| ?> | |
| <script type="text/javascript"> | |
| (function() { |
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 | |
| /** | |
| * Orderable addons: shortcode to display the total price of the product with addons | |
| */ | |
| function orderable_addons_price_total() { | |
| global $product; | |
| $price = $product->get_price(); | |
| return sprintf('<div class="orderable-product__actions-price">%s</div>', wc_price($price)); | |
| } | |
| add_shortcode( 'orderable_addons_price_total', 'orderable_addons_price_total' ); |
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 Fees description to "Collection Fee" for local pickup. | |
| * | |
| * @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
| /** | |
| * Iconic WDS - Disable holidays and timeslots. | |
| * Can be useful when because of a user error, holidays or Timeslots have incorrect values | |
| * breaking the site. | |
| * | |
| * This provides a temporary access to the settings to fix the issue. | |
| * To be removed after the issue is fixed. | |
| */ | |
| add_action( 'wp_loaded', 'iconic_wds_disable_holidays_timeslots', 11 ); | |
| function iconic_wds_disable_holidays_timeslots() { |
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_filter( 'iconic_wlv_group_data', 'iconic_lv_add_custom_linked_variations', 10, 2 ); | |
| function iconic_lv_add_custom_linked_variations( $group_data, $product_id ) { | |
| // Todo1. Add the actual linked variation ID here | |
| $linked_variation_id = 93; | |
| if ( $group_data['group']->post->ID !== $linked_variation_id ) { | |
| return $group_data; | |
| } |
NewerOlder