Changeset 2808455
- Timestamp:
- 11/01/2022 07:02:11 AM (3 years ago)
- Location:
- weight-based-pricing-for-woocommerce/trunk
- Files:
-
- 6 edited
-
App/Controllers/Frontend/ProductAdjustments.php (modified) (2 diffs)
-
App/Views/Frontend/PricingSection.php (modified) (2 diffs)
-
Assets/JS/wwbp_frontend.js (modified) (1 diff)
-
i18n/languages/weight-based-pricing-woocommerce.pot (modified) (6 diffs)
-
readme.txt (modified) (2 diffs)
-
weight-based-pricing-woocommerce.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
weight-based-pricing-for-woocommerce/trunk/App/Controllers/Frontend/ProductAdjustments.php
r2746903 r2808455 41 41 if ($is_enable != 'yes') return; 42 42 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 } 44 46 } 45 47 … … 49 51 public function displayVariableProductCalculationSection() 50 52 { 51 PricingSection::variableProduct(); 53 global $product; 54 if (is_object($product) && in_array($product->get_type(), ['variable', 'variable-subscription'])) { 55 PricingSection::variableProduct($product); 56 } 52 57 } 53 58 -
weight-based-pricing-for-woocommerce/trunk/App/Views/Frontend/PricingSection.php
r2692935 r2808455 10 10 * Simple Product Pricing section. 11 11 */ 12 public static function simpleProduct($p ost_id, $product_data)12 public static function simpleProduct($product, $product_data) 13 13 { 14 global $product;15 16 14 $weight_label = __('Weight','weight-based-pricing-woocommerce'); 17 15 $sale_price_label = get_option('wwbp_sale_price_label', 'Sale Price'); … … 113 111 * Variable Product Pricing section. 114 112 */ 115 public static function variableProduct( )113 public static function variableProduct($product) 116 114 { 117 global $product;118 119 115 $general_data = []; 120 116 $variations_data = []; -
weight-based-pricing-for-woocommerce/trunk/Assets/JS/wwbp_frontend.js
r2692935 r2808455 151 151 152 152 // 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 () { 154 154 155 155 // Get values -
weight-based-pricing-for-woocommerce/trunk/i18n/languages/weight-based-pricing-woocommerce.pot
r2716634 r2808455 3 3 msgid "" 4 4 msgstr "" 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" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/weight-based-pricing-for-woocommerce\n" 7 7 "Last-Translator: Anantharaj <anantharaj@w3cert.in>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "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" 13 13 "PO-Revision-Date: \n" 14 "X-Generator: WP-CLI 2. 5.0\n"14 "X-Generator: WP-CLI 2.6.0\n" 15 15 "X-Domain: weight-based-pricing-woocommerce\n" 16 16 … … 24 24 25 25 #. Description of the plugin 26 msgid "Weight Based Product Pricing for WooCommerce helps you set product pricesbased on the weight."26 msgid "Weight Based Product Pricing for WooCommerce helps you to set product price based on the weight." 27 27 msgstr "" 28 28 29 29 #. Author of the plugin 30 30 msgid "Themeparrot" 31 msgstr "" 32 33 #. Author URI of the plugin 34 msgid "https://themeparrot.com/" 31 35 msgstr "" 32 36 … … 110 114 111 115 #: App/Controllers/Frontend/CartAdjustments.php:51 112 #: App/Controllers/Frontend/CartAdjustments.php:7 3116 #: App/Controllers/Frontend/CartAdjustments.php:72 113 117 msgid "Invalid weight quantity" 114 118 msgstr "" … … 122 126 msgstr "" 123 127 124 #: App/Controllers/Frontend/CartAdjustments.php:9 6128 #: App/Controllers/Frontend/CartAdjustments.php:94 125 129 msgid "You cannot add that [current_quantity] to the cart - We have [stock_quantity] in stock and you already have [cart_quantity] in your cart" 126 130 msgstr "" 127 131 128 #: App/Controllers/Frontend/CartAdjustments.php:15 2129 #: App/Views/Frontend/PricingSection.php:1 6130 #: App/Views/Frontend/PricingSection.php:1 22132 #: App/Controllers/Frontend/CartAdjustments.php:150 133 #: App/Views/Frontend/PricingSection.php:14 134 #: App/Views/Frontend/PricingSection.php:118 131 135 msgid "Weight" 132 136 msgstr "" 133 137 134 #: App/Controllers/Frontend/CartAdjustments.php:15 8135 #: App/Views/Frontend/PricingSection.php: 21136 #: App/Views/Frontend/PricingSection.php:12 7138 #: App/Controllers/Frontend/CartAdjustments.php:156 139 #: App/Views/Frontend/PricingSection.php:19 140 #: App/Views/Frontend/PricingSection.php:123 137 141 msgid "[actual_weight_label]" 138 142 msgstr "" … … 241 245 msgstr "" 242 246 243 #: App/Views/Frontend/PricingSection.php: 20244 #: App/Views/Frontend/PricingSection.php:12 6247 #: App/Views/Frontend/PricingSection.php:18 248 #: App/Views/Frontend/PricingSection.php:122 245 249 msgid "[sale_price_label]" 246 250 msgstr "" -
weight-based-pricing-for-woocommerce/trunk/readme.txt
r2746903 r2808455 6 6 Requires PHP: 5.6 7 7 Tested up to: 6.0 8 Stable tag: 1.1. 38 Stable tag: 1.1.4 9 9 License: GPLv3 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 58 58 == Changelog == 59 59 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 60 64 = 1.1.3 - 23/06/2022 = 61 65 * Add - "wbp_wc_price_html" event -
weight-based-pricing-for-woocommerce/trunk/weight-based-pricing-woocommerce.php
r2746903 r2808455 4 4 * Plugin URI: https://www.themeparrot.com/ 5 5 * Description: Weight Based Product Pricing for WooCommerce helps you to set product price based on the weight. 6 * Version: 1.1. 36 * Version: 1.1.4 7 7 * Author: Themeparrot 8 8 * Author URI: https://themeparrot.com/ … … 21 21 // This plugin constants 22 22 defined('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');23 defined('WWBP_PLUGIN_VERSION') or define('WWBP_PLUGIN_VERSION', '1.1.4'); 24 24 25 25 defined('WWBP_PLUGIN_FILE') or define('WWBP_PLUGIN_FILE', __FILE__);
Note: See TracChangeset
for help on using the changeset viewer.