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( 'woocommerce_review_order_before_cart_contents', 'flux_display_display_notice_to_get_discount_with_qty', 10 ); | |
| function flux_display_display_notice_to_get_discount_with_qty() { | |
| $current = WC()->cart->cart_contents_count; | |
| $return_to = wc_get_page_permalink( 'shop' ); | |
| echo '<tr><td colspan="2">'; | |
| switch ( $current ) { | |
| case '1': | |
| $added_text = 'Get 20% off when purchasing 2!'; |
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( | |
| 'init', | |
| function() { | |
| $GLOBALS['ct_skip_checkout'] = 1; | |
| } | |
| ); |
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 delivery date and time to Print Invoice & Delivery Notes for WooCommerce by Tyche Softwares. | |
| * | |
| * @param array $fields | |
| * @param WC_Order $order | |
| * | |
| * @return array | |
| */ | |
| function iconic_add_invoice_fields( $fields, $order ) { |
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 - Set specific dates for a product category. | |
| * | |
| * @param array $dates | |
| * @param string $format | |
| * @param bool $ignore_slots | |
| * | |
| * @return array |
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 - Add street number last in the billing address. | |
| * | |
| * @param string $new_billing_address Billing address with street number. | |
| * @param string $current_billing_address Billing Address without street number. | |
| * @param string $billing_street_no Billing street number. | |
| * @param WC_Order $order Order. | |
| * | |
| * @return string |
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 | |
| /** | |
| * Modify "Continue Shopping" button URL on the Flux Thank You page. | |
| * | |
| * @param string $shop_url Shop page url. | |
| * | |
| * @return string | |
| */ | |
| function flux_checkout_change_shop_page_url( $shop_url ) { |
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 Fee for local pickup. | |
| * | |
| * @return void | |
| */ | |
| function iconic_wds_disable_fees_for_flatrate() { | |
| $shipping_methods = WC()->session->get( 'chosen_shipping_methods' ); | |
| $post_data = filter_input( INPUT_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 | |
| /** | |
| * Modify format of the selected date at Reservation Table. | |
| * Remove st, th, etc suffix. | |
| * | |
| * @param array $dates Dates. | |
| */ | |
| function iconic_wds_modify_date_format_reservation_table( $dates, $format ) { | |
| if ( ! wp_doing_ajax() ) { | |
| return $dates; |
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 - dont include delivery date/timeslot to invoice generated by Overnight PDF Invoices & Packing Slips for WooCommerce. | |
| * | |
| * @return void | |
| */ | |
| function iconic_wds_exclude_item_data_pdf_invoice() { | |
| $action = filter_input( INPUT_GET, 'action' ); | |
| if ( 'generate_wpo_wcpdf' === $action ) { | |
| remove_filter( 'woocommerce_get_order_item_totals', array( 'Iconic_WDS_Order', 'add_to_order_details' ), 10, 3 ); |
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 | |
| /** | |
| * Display a dropdown of non-hierarchical post types. | |
| * For hierarchical CPTs you can use `wp_dropdown_pages`. | |
| * | |
| * @param string $args Arguments. | |
| * | |
| * @return void | |
| */ | |
| public function dropdown_non_hierarchical_posts( $args ) { |