Plugin Directory

Changeset 1828586


Ignore:
Timestamp:
02/24/2018 10:24:15 PM (8 years ago)
Author:
opentools
Message:

V2.0.6: Add evaluate_for_shippingclasses function

Location:
shipping-by-rules-for-woocommerce
Files:
3 edited
22 copied

Legend:

Unmodified
Added
Removed
  • shipping-by-rules-for-woocommerce/tags/2.0.6/includes/rules_shipping_framework_woocommerce.php

    r1828573 r1828586  
    2424            "skus"          => 'products',
    2525            "vendors"       => 'vendors',
     26            "shippingclasses" => 'shippingclasses',
    2627        ));
    2728    }
     
    474475                continue;
    475476           
     477            if (!empty($filter_conditions['shippingclasses'])) {
     478                $shipclass = $p['data']->get_shipping_class();
     479                if ($shipclass) {
     480                    if (!in_array($shipclass, $filter_conditions['shippingclasses'] ))
     481                        continue;
     482                } else {
     483                    // No shipping class set for product, but scoping has a valid shipping clase => filter out product
     484                    continue;
     485                }
     486            }
     487           
    476488            if (!empty($filter_conditions['vendors'])) {
    477489                // Collect all vendors (ids and slug/login_name - PLUGIN-specific!)
     
    481493               
    482494                // THIRD-PARTY SUPPORT
    483                 // "WC Vendors" support (vendors stored as post author)
    484                 if (class_exists("WC_Vendors")) {
     495                // "WC Vendors" and "Dokan Marketplace" support (vendors stored as post author)
     496                if (class_exists("WC_Vendors") || class_exists("WeDevs_Dokan")) {
    485497                    $vendor = $p['data']->post->post_author;
    486498                    $vnd = get_user_by('id', $vendor);  // Get user name by user id
  • shipping-by-rules-for-woocommerce/tags/2.0.6/readme.txt

    r1828573 r1828586  
    44Requires at least: 4.0
    55Tested up to: 4.9.4
    6 Stable tag: 2.0.5
     6Stable tag: 2.0.6
    77License: GPLv3 or later
    88License URI: http://www.gnu.org/licenses/gpl.html
     
    6969
    7070== Changelog ==
     71
     72= 2.0.6 =
     73* Add function evaluate_for_shippingclasses
    7174
    7275= 2.0.5 =
  • shipping-by-rules-for-woocommerce/tags/2.0.6/woocommerce-shipping-by-rules.php

    r1828573 r1828586  
    44 * Plugin URI: http://open-tools.net/woocommerce/advanced-shipping-by-rules-for-woocommerce.html
    55 * Description: Define Shipping cost by very general and flexible (text-based) rules.
    6  * Version: 2.0.5
     6 * Version: 2.0.6
    77 * Author: Open Tools, Reinhold Kainhofer
    88 * Author URI: http://open-tools.net
  • shipping-by-rules-for-woocommerce/trunk/includes/rules_shipping_framework_woocommerce.php

    r1828573 r1828586  
    2424            "skus"          => 'products',
    2525            "vendors"       => 'vendors',
     26            "shippingclasses" => 'shippingclasses',
    2627        ));
    2728    }
     
    474475                continue;
    475476           
     477            if (!empty($filter_conditions['shippingclasses'])) {
     478                $shipclass = $p['data']->get_shipping_class();
     479                if ($shipclass) {
     480                    if (!in_array($shipclass, $filter_conditions['shippingclasses'] ))
     481                        continue;
     482                } else {
     483                    // No shipping class set for product, but scoping has a valid shipping clase => filter out product
     484                    continue;
     485                }
     486            }
     487           
    476488            if (!empty($filter_conditions['vendors'])) {
    477489                // Collect all vendors (ids and slug/login_name - PLUGIN-specific!)
     
    481493               
    482494                // THIRD-PARTY SUPPORT
    483                 // "WC Vendors" support (vendors stored as post author)
    484                 if (class_exists("WC_Vendors")) {
     495                // "WC Vendors" and "Dokan Marketplace" support (vendors stored as post author)
     496                if (class_exists("WC_Vendors") || class_exists("WeDevs_Dokan")) {
    485497                    $vendor = $p['data']->post->post_author;
    486498                    $vnd = get_user_by('id', $vendor);  // Get user name by user id
  • shipping-by-rules-for-woocommerce/trunk/readme.txt

    r1828573 r1828586  
    44Requires at least: 4.0
    55Tested up to: 4.9.4
    6 Stable tag: 2.0.5
     6Stable tag: 2.0.6
    77License: GPLv3 or later
    88License URI: http://www.gnu.org/licenses/gpl.html
     
    6969
    7070== Changelog ==
     71
     72= 2.0.6 =
     73* Add function evaluate_for_shippingclasses
    7174
    7275= 2.0.5 =
  • shipping-by-rules-for-woocommerce/trunk/woocommerce-shipping-by-rules.php

    r1828573 r1828586  
    44 * Plugin URI: http://open-tools.net/woocommerce/advanced-shipping-by-rules-for-woocommerce.html
    55 * Description: Define Shipping cost by very general and flexible (text-based) rules.
    6  * Version: 2.0.5
     6 * Version: 2.0.6
    77 * Author: Open Tools, Reinhold Kainhofer
    88 * Author URI: http://open-tools.net
Note: See TracChangeset for help on using the changeset viewer.