Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  • Hook Reference
  • Docs Home

Packages

  • None
  • Product-Delivery-Date-Pro-for-WooCommerce
    • Addon
    • Admin
      • Settings
        • Field-Labels
        • General
        • Google-Sync
      • View-Deliveries
    • Calendar
    • Common-Functions
    • Configuration
    • Delivery-Charges
    • Edit-Deliveries
    • Emails
    • Frontend
      • Cart
      • Checkout
    • Google-Calendar
    • Languages
    • License
    • Reschedule-Deliveries
    • View-Deliveries

Classes

  • EDD_PRDD_Plugin_Updater
  • prdd_addon_compatibility_class
  • prdd_admin_deliveries
  • prdd_adminevent_jsons
  • prdd_box_class
  • prdd_cart
  • prdd_checkout
  • prdd_common
  • prdd_delivery_labels_settings
  • prdd_delivery_settings
  • prdd_edit_deliveries_class
  • PRDD_Email_Delivery_Rescheduled
  • PRDD_Email_Delivery_Rescheduled_Admin
  • PRDD_Email_Manager
  • prdd_estimate_delivery
  • prdd_global_menu
  • prdd_ics
  • prdd_license
  • prdd_process
  • prdd_rescheduled_order_class
  • prdd_special_delivery_price
  • prdd_timeslot_price
  • prdd_validation
  • PRDD_View_Deliveries_Table
  • ts_google_calendar_sync
  • ts_google_calendar_sync_settings
  • TsGcal
  • view_deliveries
  • woocommerce_prdd

Functions

  • is_prdd_active
  • prdd_get_dateToCal
  • prdd_get_delivery_arrays
  • prdd_get_delivery_t
  • prdd_get_escapeString
  • prdd_woocommerce_delete
  • ts_get_option
 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 
<?php

/**
 * Product Delivery Date for WooCommerce
 * 
 * This file will use for making compatible Product Delivery date plugin with other plugins.
 *
 * @author  Tyche Softwares
 * @package Product-Delivery-Date-Pro-for-WooCommerce/Addon Compatibility
 * @todo  check the file when it is used and remove if it is not necessary
 * @since   
 */

if( ! class_exists( 'prdd_addon_compatibility_class' ) ) {
    
    /**
     * Class for making Product Delivery Date compatible with other plugins
     *
     * @since 
     * @todo  check the class and remove if it is not necessary
     */
    class prdd_addon_compatibility_class {

        /**
         * Construct function for initializing
         *
         * @since 
         * @todo  check the function and remove if it is not necessary
         */
        function __construct() {
            add_action( 'woocommerce_checkout_create_order_line_item', array( &$this, 'prdd_add_wpa_prices' ), 10, 3 );
        }
        /**
         * Construct function for initializing
         *
         * @hook woocommerce_checkout_create_order_line_item
         * 
         * @param $item 
         * @param $cart_item_key
         * @param $values
         * @since 
         * @todo  check the function when it is used and remove if it is not necessary
         */
        public function prdd_add_wpa_prices( $item, $cart_item_key, $values ) {     
            if ( isset( $values['prdd_delivery'] ) && isset( $values['addons'] ) && count( $values['addons'] ) > 0 ) {
                $wpa_total = prdd_common::woo_product_addons_compatibility_cart( $values );
                $item->add_meta_data( '_prdd_wpa_prices', $wpa_total );
            }
        }
    }
}

$prdd_addon_compatibility_class = new prdd_addon_compatibility_class();
API documentation generated by ApiGen