Plugin Directory

Changeset 2808455


Ignore:
Timestamp:
11/01/2022 07:02:11 AM (3 years ago)
Author:
themeparrot
Message:

release 1.1.4

Location:
weight-based-pricing-for-woocommerce/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • weight-based-pricing-for-woocommerce/trunk/App/Controllers/Frontend/ProductAdjustments.php

    r2746903 r2808455  
    4141        if ($is_enable != 'yes') return;
    4242
    43         PricingSection::simpleProduct($product_id, $product_data);
     43        if (is_object($product) && !in_array($product->get_type(), ['variable', 'variable-subscription'])) {
     44            PricingSection::simpleProduct($product, $product_data);
     45        }
    4446    }
    4547
     
    4951    public function displayVariableProductCalculationSection()
    5052    {
    51         PricingSection::variableProduct();
     53        global $product;
     54        if (is_object($product) && in_array($product->get_type(), ['variable', 'variable-subscription'])) {
     55            PricingSection::variableProduct($product);
     56        }
    5257    }
    5358
  • weight-based-pricing-for-woocommerce/trunk/App/Views/Frontend/PricingSection.php

    r2692935 r2808455  
    1010     * Simple Product Pricing section.
    1111     */
    12     public static function simpleProduct($post_id, $product_data)
     12    public static function simpleProduct($product, $product_data)
    1313    {
    14         global $product;
    15 
    1614        $weight_label = __('Weight','weight-based-pricing-woocommerce');
    1715        $sale_price_label = get_option('wwbp_sale_price_label', 'Sale Price');
     
    113111     * Variable Product Pricing section.
    114112     */
    115     public static function variableProduct()
     113    public static function variableProduct($product)
    116114    {
    117         global $product;
    118 
    119115        $general_data = [];
    120116        $variations_data = [];
  • weight-based-pricing-for-woocommerce/trunk/Assets/JS/wwbp_frontend.js

    r2692935 r2808455  
    151151
    152152    // Weight "plus" and "minus" buttons
    153     $(document.body).on('click', '.plus, .minus', function () {
     153    $(document.body).on('click', '.wwbp_button.plus, .wwbp_button.minus', function () {
    154154
    155155        // Get values
  • weight-based-pricing-for-woocommerce/trunk/i18n/languages/weight-based-pricing-woocommerce.pot

    r2716634 r2808455  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Weight Based Pricing for WooCommerce 1.1.2\n"
     5"Project-Id-Version: Weight Based Pricing for WooCommerce 1.1.4\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/weight-based-pricing-for-woocommerce\n"
    77"Last-Translator: Anantharaj <anantharaj@w3cert.in>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2022-04-30T10:38:00+05:30\n"
     12"POT-Creation-Date: 2022-10-31T15:58:32+05:30\n"
    1313"PO-Revision-Date: \n"
    14 "X-Generator: WP-CLI 2.5.0\n"
     14"X-Generator: WP-CLI 2.6.0\n"
    1515"X-Domain: weight-based-pricing-woocommerce\n"
    1616
     
    2424
    2525#. Description of the plugin
    26 msgid "Weight Based Product Pricing for WooCommerce helps you set product prices based on the weight."
     26msgid "Weight Based Product Pricing for WooCommerce helps you to set product price based on the weight."
    2727msgstr ""
    2828
    2929#. Author of the plugin
    3030msgid "Themeparrot"
     31msgstr ""
     32
     33#. Author URI of the plugin
     34msgid "https://themeparrot.com/"
    3135msgstr ""
    3236
     
    110114
    111115#: App/Controllers/Frontend/CartAdjustments.php:51
    112 #: App/Controllers/Frontend/CartAdjustments.php:73
     116#: App/Controllers/Frontend/CartAdjustments.php:72
    113117msgid "Invalid weight quantity"
    114118msgstr ""
     
    122126msgstr ""
    123127
    124 #: App/Controllers/Frontend/CartAdjustments.php:96
     128#: App/Controllers/Frontend/CartAdjustments.php:94
    125129msgid "You cannot add that [current_quantity] to the cart - We have [stock_quantity] in stock and you already have [cart_quantity] in your cart"
    126130msgstr ""
    127131
    128 #: App/Controllers/Frontend/CartAdjustments.php:152
    129 #: App/Views/Frontend/PricingSection.php:16
    130 #: App/Views/Frontend/PricingSection.php:122
     132#: App/Controllers/Frontend/CartAdjustments.php:150
     133#: App/Views/Frontend/PricingSection.php:14
     134#: App/Views/Frontend/PricingSection.php:118
    131135msgid "Weight"
    132136msgstr ""
    133137
    134 #: App/Controllers/Frontend/CartAdjustments.php:158
    135 #: App/Views/Frontend/PricingSection.php:21
    136 #: App/Views/Frontend/PricingSection.php:127
     138#: App/Controllers/Frontend/CartAdjustments.php:156
     139#: App/Views/Frontend/PricingSection.php:19
     140#: App/Views/Frontend/PricingSection.php:123
    137141msgid "[actual_weight_label]"
    138142msgstr ""
     
    241245msgstr ""
    242246
    243 #: App/Views/Frontend/PricingSection.php:20
    244 #: App/Views/Frontend/PricingSection.php:126
     247#: App/Views/Frontend/PricingSection.php:18
     248#: App/Views/Frontend/PricingSection.php:122
    245249msgid "[sale_price_label]"
    246250msgstr ""
  • weight-based-pricing-for-woocommerce/trunk/readme.txt

    r2746903 r2808455  
    66Requires PHP: 5.6
    77Tested up to: 6.0
    8 Stable tag: 1.1.3
     8Stable tag: 1.1.4
    99License: GPLv3 or later
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    5858== Changelog ==
    5959
     60= 1.1.4 - 31/10/2022 =
     61* Improvement - Frontend script (JS)
     62* Fix - Simple product pricing section may loads in variable product page
     63
    6064= 1.1.3 - 23/06/2022 =
    6165* Add - "wbp_wc_price_html" event
  • weight-based-pricing-for-woocommerce/trunk/weight-based-pricing-woocommerce.php

    r2746903 r2808455  
    44 * Plugin URI: https://www.themeparrot.com/
    55 * Description: Weight Based Product Pricing for WooCommerce helps you to set product price based on the weight.
    6  * Version: 1.1.3
     6 * Version: 1.1.4
    77 * Author: Themeparrot
    88 * Author URI: https://themeparrot.com/
     
    2121// This plugin constants
    2222defined('WWBP_PLUGIN_NAME') or define('WWBP_PLUGIN_NAME', 'Weight Based Pricing for WooCommerce');
    23 defined('WWBP_PLUGIN_VERSION') or define('WWBP_PLUGIN_VERSION', '1.1.3');
     23defined('WWBP_PLUGIN_VERSION') or define('WWBP_PLUGIN_VERSION', '1.1.4');
    2424
    2525defined('WWBP_PLUGIN_FILE') or define('WWBP_PLUGIN_FILE', __FILE__);
Note: See TracChangeset for help on using the changeset viewer.