Changeset 2918720
- Timestamp:
- 05/29/2023 08:14:38 PM (3 years ago)
- Location:
- payforme
- Files:
-
- 2 added
- 2 deleted
- 4 edited
- 5 copied
-
tags/2.0.5 (copied) (copied from payforme/trunk)
-
tags/2.0.5/README.txt (copied) (copied from payforme/trunk/README.txt) (2 diffs)
-
tags/2.0.5/build/asset-manifest.json (copied) (copied from payforme/trunk/build/asset-manifest.json) (1 diff)
-
tags/2.0.5/build/static/js/main.24b3aec6.js (deleted)
-
tags/2.0.5/build/static/js/main.8e87d2a3.js (added)
-
tags/2.0.5/changelog.txt (copied) (copied from payforme/trunk/changelog.txt) (1 diff)
-
tags/2.0.5/payforme-woocommerce.php (copied) (copied from payforme/trunk/payforme-woocommerce.php) (7 diffs)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/build/asset-manifest.json (modified) (1 diff)
-
trunk/build/static/js/main.8e87d2a3.js (added)
-
trunk/build/static/js/main.c9510b7e.js (deleted)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/payforme-woocommerce.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
payforme/tags/2.0.5/README.txt
r2917635 r2918720 1 1 === PayForMe for Woocommerce === 2 2 Contributors: payformeuser 3 Tags: payforme, pay for me, payment, checkout, woocommerce, ecommerce, e-commerce, commerce, payment gateway, other pays, someone else pays, third party payments3 Tags: payforme, pay for me, payment, checkout, stripe, woocommerce, ecommerce, e-commerce, commerce, payment gateway, other pays, someone else pays, third party payments 4 4 Requires at least: 5.0 5 Tested up to: 6.2 6 Stable tag: 2.0. 45 Tested up to: 6.2.2 6 Stable tag: 2.0.5 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 76 76 == Changelog == 77 77 78 = 2.0.5 = 79 * Add - Support for custom store fees. 80 * Fix - Minor UI improvements. 81 78 82 = 2.0.4 = 79 83 * Add - Rebranded logo -
payforme/tags/2.0.5/build/asset-manifest.json
r2917635 r2918720 2 2 "files": { 3 3 "main.css": "/static/css/main.dda31fb0.css", 4 "main.js": "/static/js/main. c9510b7e.js",4 "main.js": "/static/js/main.8e87d2a3.js", 5 5 "static/js/787.bc7d429a.chunk.js": "/static/js/787.bc7d429a.chunk.js", 6 6 "index.html": "/index.html", 7 7 "main.dda31fb0.css.map": "/static/css/main.dda31fb0.css.map", 8 "main. c9510b7e.js.map": "/static/js/main.c9510b7e.js.map",8 "main.8e87d2a3.js.map": "/static/js/main.8e87d2a3.js.map", 9 9 "787.bc7d429a.chunk.js.map": "/static/js/787.bc7d429a.chunk.js.map" 10 10 }, 11 11 "entrypoints": [ 12 12 "static/css/main.dda31fb0.css", 13 "static/js/main. c9510b7e.js"13 "static/js/main.8e87d2a3.js" 14 14 ] 15 15 } -
payforme/tags/2.0.5/changelog.txt
r2917635 r2918720 1 1 *** PayForMe for Woocommerce Changelog *** 2 3 2023-05-29 - version 2.0.5 4 * Add - Support for custom store fees. 5 * Fix - Minor UI improvements. 2 6 3 7 2023-05-26 - version 2.0.4 -
payforme/tags/2.0.5/payforme-woocommerce.php
r2917635 r2918720 7 7 * Plugin URI: https://wordpress.org/plugins/payforme/ 8 8 * Description: PayForMe enables people to pay for the purchases of their friends and families via a secure payment link. Accept Credit/Debit cards, ApplePay and GooglePay using PayForMe. 9 * Version: 2.0. 49 * Version: 2.0.5 10 10 * Author: PayForMe 11 11 * Author URI: https://payforme.io/ 12 12 * License: GPL-2.0 13 13 * Requires at least: 5.0 14 * Tested up to: 6.2 14 * Tested up to: 6.2.2 15 15 * WC requires at least: 4.7 16 16 * WC tested up to: 7.6.1 … … 196 196 $cart_data->totals = $cart->get_totals(); 197 197 $cart_data->line_items = payforme_get_cart_items($currency); 198 $cart_data->line_fees = payforme_get_cart_fees($currency); 198 199 $cart_data->coupons = payforme_get_cart_coupons($cart); 199 200 $cart_data->shipping_rates = payforme_get_chosen_shipping_rates(); … … 308 309 309 310 /** 310 * Gets the cart the cart items 311 * @param WC_Tax_Rate[] woo tax rates 312 * @returns taxrates format expected by payforme server 313 */ 314 function wc_taxrates_to_payforme_taxrates($tax_rates) { 315 $pfm_tax_rates = []; 316 foreach ($tax_rates as $key => $rate) { 317 $_rate_item = [ 318 'id' => $key, 319 'label' => $rate['label'], 320 'percent' => $rate['rate'], 321 ]; 322 array_push($pfm_tax_rates, $_rate_item); 323 } 324 325 return $pfm_tax_rates; 326 } 327 328 /** 329 * Gets the cart items 311 330 * @return array of cart items 312 331 */ … … 320 339 $product_id = $item['product_id']; 321 340 $product = wc_get_product($variation_id ? $variation_id : $product_id); 322 $tax es = $wc_tax->get_rates($product->get_tax_class());341 $tax_rates = $wc_tax->get_rates($product->get_tax_class()); 323 342 324 343 $image_id = $product->get_image_id(); … … 326 345 $image_url = reset($image_url_srcs); 327 346 $image_urls = ($image_url) ? [$image_url] : []; 328 329 $_tax_rates = [];330 foreach ($taxes as $key => $rate) {331 $_rate_item = [332 'id' => $key,333 'label' => $rate['label'],334 'percent' => $rate['rate'],335 ];336 array_push($_tax_rates, $_rate_item);337 }338 347 339 348 $item = [ … … 345 354 'line_tax' => $item['line_tax'], 346 355 'quantity' => $item['quantity'], 347 'tax_rates' => $_tax_rates,356 'tax_rates' => wc_taxrates_to_payforme_taxrates($tax_rates), 348 357 'currency' => $currency, 349 358 'images' => $image_urls, … … 353 362 354 363 return $arr; 364 } 365 366 function payforme_get_cart_fees($currency) { 367 $fees = WC()->cart->get_fees(); 368 $fees = array_values($fees); 369 370 $line_fees = []; 371 foreach ($fees as $fee) { 372 $tax_rates = $fee->taxable ? WC_Tax::get_rates($fee->tax_class, WC()->customer) : []; 373 $item = [ 374 'id' => $fee->id, 375 'name' => $fee->name, 376 'amount' => $fee->amount, 377 'total' => $fee->total, 378 'tax' => $fee->tax, 379 'taxable' => $fee->taxable, 380 'tax_class' => $fee->tax_class, 381 'tax_status' => $fee->taxable ? 'taxable' : 'none', 382 'currency' => $currency, 383 'tax_rates' => wc_taxrates_to_payforme_taxrates($tax_rates), 384 ]; 385 array_push($line_fees, $item); 386 } 387 388 return $line_fees; 355 389 } 356 390 -
payforme/trunk/README.txt
r2917635 r2918720 1 1 === PayForMe for Woocommerce === 2 2 Contributors: payformeuser 3 Tags: payforme, pay for me, payment, checkout, woocommerce, ecommerce, e-commerce, commerce, payment gateway, other pays, someone else pays, third party payments3 Tags: payforme, pay for me, payment, checkout, stripe, woocommerce, ecommerce, e-commerce, commerce, payment gateway, other pays, someone else pays, third party payments 4 4 Requires at least: 5.0 5 Tested up to: 6.2 6 Stable tag: 2.0. 45 Tested up to: 6.2.2 6 Stable tag: 2.0.5 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 76 76 == Changelog == 77 77 78 = 2.0.5 = 79 * Add - Support for custom store fees. 80 * Fix - Minor UI improvements. 81 78 82 = 2.0.4 = 79 83 * Add - Rebranded logo -
payforme/trunk/build/asset-manifest.json
r2917635 r2918720 2 2 "files": { 3 3 "main.css": "/static/css/main.dda31fb0.css", 4 "main.js": "/static/js/main. c9510b7e.js",4 "main.js": "/static/js/main.8e87d2a3.js", 5 5 "static/js/787.bc7d429a.chunk.js": "/static/js/787.bc7d429a.chunk.js", 6 6 "index.html": "/index.html", 7 7 "main.dda31fb0.css.map": "/static/css/main.dda31fb0.css.map", 8 "main. c9510b7e.js.map": "/static/js/main.c9510b7e.js.map",8 "main.8e87d2a3.js.map": "/static/js/main.8e87d2a3.js.map", 9 9 "787.bc7d429a.chunk.js.map": "/static/js/787.bc7d429a.chunk.js.map" 10 10 }, 11 11 "entrypoints": [ 12 12 "static/css/main.dda31fb0.css", 13 "static/js/main. c9510b7e.js"13 "static/js/main.8e87d2a3.js" 14 14 ] 15 15 } -
payforme/trunk/changelog.txt
r2917635 r2918720 1 1 *** PayForMe for Woocommerce Changelog *** 2 3 2023-05-29 - version 2.0.5 4 * Add - Support for custom store fees. 5 * Fix - Minor UI improvements. 2 6 3 7 2023-05-26 - version 2.0.4 -
payforme/trunk/payforme-woocommerce.php
r2917635 r2918720 7 7 * Plugin URI: https://wordpress.org/plugins/payforme/ 8 8 * Description: PayForMe enables people to pay for the purchases of their friends and families via a secure payment link. Accept Credit/Debit cards, ApplePay and GooglePay using PayForMe. 9 * Version: 2.0. 49 * Version: 2.0.5 10 10 * Author: PayForMe 11 11 * Author URI: https://payforme.io/ 12 12 * License: GPL-2.0 13 13 * Requires at least: 5.0 14 * Tested up to: 6.2 14 * Tested up to: 6.2.2 15 15 * WC requires at least: 4.7 16 16 * WC tested up to: 7.6.1 … … 196 196 $cart_data->totals = $cart->get_totals(); 197 197 $cart_data->line_items = payforme_get_cart_items($currency); 198 $cart_data->line_fees = payforme_get_cart_fees($currency); 198 199 $cart_data->coupons = payforme_get_cart_coupons($cart); 199 200 $cart_data->shipping_rates = payforme_get_chosen_shipping_rates(); … … 308 309 309 310 /** 310 * Gets the cart the cart items 311 * @param WC_Tax_Rate[] woo tax rates 312 * @returns taxrates format expected by payforme server 313 */ 314 function wc_taxrates_to_payforme_taxrates($tax_rates) { 315 $pfm_tax_rates = []; 316 foreach ($tax_rates as $key => $rate) { 317 $_rate_item = [ 318 'id' => $key, 319 'label' => $rate['label'], 320 'percent' => $rate['rate'], 321 ]; 322 array_push($pfm_tax_rates, $_rate_item); 323 } 324 325 return $pfm_tax_rates; 326 } 327 328 /** 329 * Gets the cart items 311 330 * @return array of cart items 312 331 */ … … 320 339 $product_id = $item['product_id']; 321 340 $product = wc_get_product($variation_id ? $variation_id : $product_id); 322 $tax es = $wc_tax->get_rates($product->get_tax_class());341 $tax_rates = $wc_tax->get_rates($product->get_tax_class()); 323 342 324 343 $image_id = $product->get_image_id(); … … 326 345 $image_url = reset($image_url_srcs); 327 346 $image_urls = ($image_url) ? [$image_url] : []; 328 329 $_tax_rates = [];330 foreach ($taxes as $key => $rate) {331 $_rate_item = [332 'id' => $key,333 'label' => $rate['label'],334 'percent' => $rate['rate'],335 ];336 array_push($_tax_rates, $_rate_item);337 }338 347 339 348 $item = [ … … 345 354 'line_tax' => $item['line_tax'], 346 355 'quantity' => $item['quantity'], 347 'tax_rates' => $_tax_rates,356 'tax_rates' => wc_taxrates_to_payforme_taxrates($tax_rates), 348 357 'currency' => $currency, 349 358 'images' => $image_urls, … … 353 362 354 363 return $arr; 364 } 365 366 function payforme_get_cart_fees($currency) { 367 $fees = WC()->cart->get_fees(); 368 $fees = array_values($fees); 369 370 $line_fees = []; 371 foreach ($fees as $fee) { 372 $tax_rates = $fee->taxable ? WC_Tax::get_rates($fee->tax_class, WC()->customer) : []; 373 $item = [ 374 'id' => $fee->id, 375 'name' => $fee->name, 376 'amount' => $fee->amount, 377 'total' => $fee->total, 378 'tax' => $fee->tax, 379 'taxable' => $fee->taxable, 380 'tax_class' => $fee->tax_class, 381 'tax_status' => $fee->taxable ? 'taxable' : 'none', 382 'currency' => $currency, 383 'tax_rates' => wc_taxrates_to_payforme_taxrates($tax_rates), 384 ]; 385 array_push($line_fees, $item); 386 } 387 388 return $line_fees; 355 389 } 356 390
Note: See TracChangeset
for help on using the changeset viewer.