ffraenz
Repos
9
Followers
99
Following
43

Web app for cryptography, coding and data encouraging beginners and pros alike to explore new operations and build own workflows.

46
7

Web app and framework offering modular conversion, encoding and encryption

1254
204

Composer install helper outsourcing sensitive keys from the package URL into environment variables

212
14

Just another nasty cheatsheet. Don't judge me.

1
0

Node.js package that provides an API to control your IKEA Dioder LED light strip on your Raspberry Pi.

31
4

Events

started
Created at 12 hours ago

Fix Shannon Entropy initial value

Created at 3 weeks ago

Fix Shannon Entropy initial value

Created at 3 weeks ago

Add Index of coincidence

Add Shannon Entropy

Created at 3 weeks ago

Add Shannon Entropy

Created at 3 weeks ago

Add Index of coincidence

Created at 3 weeks ago

Add operations Substring and Binary slice

Add implicit text-number casting

Fix an issue preventing the user from copy and pasting nodes with values

Created at 3 weeks ago

Fix an issue preventing the user from copy and pasting nodes with values

Created at 3 weeks ago

Add implicit text-number casting

Created at 3 weeks ago

Add operations Substring and Binary slice

Created at 3 weeks ago
issue comment
100% percent coupons lead to credit in cart total

During my debugging session I found that the function get_discounted_price_in_cents uses $item->price, which may differ from $item->subtotal + $item->subtotal_tax, as $item->subtotal_tax may be rounded down beforehand due to the woocommerce_tax_round_at_subtotal setting.

Here are the values that occur in the get_discounted_price_in_cents function in the case stated above:

  • $item->price = 2,615.546219 (= 2,616 when rounded)
  • $item->subtotal = 2,092.436975
  • $item->subtotal_tax = 523
  • $item->subtotal + $item->subtotal_tax = 2.615,436975 (= 2,615 when rounded)

Using $item->subtotal + $item->subtotal_tax instead of $item->price fixed this particular issue for me. But I might still be missing something.

Created at 1 month ago
100% percent coupons lead to credit in cart total

Prerequisites

  • [X] I have carried out troubleshooting steps and I believe I have found a bug.
  • [X] I have searched for similar bugs in both open and closed issues and cannot find a duplicate.

Describe the bug

Applying a percentage discount coupon with the amount of 100% as the only coupon, without coupon restrictions or limits, and allowing for free shipping deducts one cent too much for certain line items, leading to a credit of a few cents in the cart total.

Expected behavior

Applying such a percentage discount coupon should lead to a free order.

Actual behavior

Applying such a percentage discount leads to a credit for certain line items, which in turn may lead to a payout.

Steps to reproduce

  1. Set up WordPress, WooCommerce, and Storefront
  2. Set store address to Germany and enable tax rates and calculations
  3. Setup the standard tax rate zones DE with 19% and SE with 25%
  4. Set 'Price entered with tax' to 'Yes, I will enter prices inclusive of tax' and 'Display prices' to 'Including tax'
  5. Add coupon '4everfree' with discount type 'Percentage discount', amount 100% an check 'Check this box if the coupon grants free shipping'
  6. Add product 'Beanie black' with price 24,90 € and set it to be taxable
  7. Add the product added above once to the cart
  8. Apply the coupon added above
  9. Set customer country to Sweden

Result: Screenshot 2023-02-24 at 15 02 56

WordPress Environment

WordPress Environment

WordPress address (URL): http://localhost/wp Site address (URL): http://localhost WC Version: 7.4.0 REST API Version: ✔ 7.4.0 WC Blocks Version: ✔ 9.4.3 Action Scheduler Version: ✔ 3.5.4 Log Directory Writable: ✔ WP Version: 6.1.1 WP Multisite: – WP Memory Limit: 2 GB WP Debug Mode: ✔ WP Cron: ✔ Language: en_US External object cache: –

Server Environment

Server Info: nginx/1.18.0 PHP Version: 8.0.28 PHP Post Max Size: 100 MB PHP Time Limit: 120 PHP Max Input Vars: 1000 cURL Version: 7.74.0 OpenSSL/1.1.1n

SUHOSIN Installed: – MySQL Version: 10.8.3-MariaDB-1:10.8.3+maria~jammy Max Upload Size: 100 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ❌ Your server does not have the SoapClient class enabled - some gateway plugins which use SOAP may not work as expected. DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔

Database

WC Database Version: 7.4.0 WC Database Prefix: wp_ Total Database Size: 4.85MB Database Data Size: 3.38MB Database Index Size: 1.47MB wp_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_actions: Data: 0.02MB + Index: 0.11MB + Engine InnoDB wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_logs: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_options: Data: 2.48MB + Index: 0.06MB + Engine InnoDB wp_postmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_posts: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB

Post Type Counts

attachment: 2 page: 7 post: 2 product: 1 shop_coupon: 2

Security

Secure connection (HTTPS): ❌ Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates. Hide errors from visitors: ❌Error messages should not be shown to visitors.

Active Plugins (1)

WooCommerce: by Automattic – 7.4.0

Inactive Plugins (0)

Settings

API Enabled: – Force SSL: – Currency: EUR (€) Currency Position: right_space Thousand Separator: . Decimal Separator: , Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable)

Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5)

Connected to WooCommerce.com: – Enforce Approved Product Download Directories: ✔ Order datastore: WC_Order_Data_Store_CPT

WC Pages

Shop base: #6 - /shop/ Cart: #7 - /cart/ Checkout: #8 - /checkout/ My account: #9 - /my-account/ Terms and conditions: ❌ Page not set

Theme

Name: Storefront Version: 4.2.0 Author URL: https://woocommerce.com/ Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ✔

Templates

Overrides: –

Admin

Enabled Features: activity-panels analytics coupons customer-effort-score-tracks import-products-task experimental-fashion-sample-products shipping-smart-defaults shipping-setting-tour homescreen marketing multichannel-marketing mobile-app-banner navigation new-product-management-experience onboarding onboarding-tasks remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices woo-mobile-welcome wc-pay-promotion wc-pay-welcome-page

Disabled Features: minified-js product-variation-management settings

Daily Cron: ✔ Next scheduled: 2023-02-24 13:44:05 +00:00 Options: ✔ Notes: 34 Onboarding: completed

Action Scheduler

Complete: 5 Oldest: 2023-02-24 13:45:08 +0000 Newest: 2023-02-24 13:48:31 +0000

Failed: 1 Oldest: 2023-02-24 13:48:31 +0000 Newest: 2023-02-24 13:48:31 +0000

Pending: 1 Oldest: 2023-02-25 13:45:08 +0000 Newest: 2023-02-25 13:45:08 +0000

Status report information

Generated at: 2023-02-24 14:06:14 +00:00

Isolating the problem

  • [X] I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
  • [X] This bug happens with a default WordPress theme active, or Storefront.
  • [X] I can reproduce this bug consistently using the steps above.
Created at 1 month ago
Created at 1 month ago

Add ROT8000 variant to the ROT13 operation

Created at 1 month ago

Add ROT8000 variant to the ROT13 operation

Created at 1 month ago
Created at 1 month ago

Make Caesar cipher and ROT13 use the simple substitution implementation

Fix ROT13 extension url

Created at 1 month ago

Fix ROT13 extension url

Created at 1 month ago

Make Caesar cipher and ROT13 use the simple substitution implementation

Created at 1 month ago

Add Affine cipher and Simple substitution cipher

Fix linting issues

Created at 1 month ago

Fix linting issues

Created at 1 month ago

Add Affine cipher and Simple substitution cipher

Created at 1 month ago

Replace enums by string unions in TypeScript

Add Rail Fence Cipher

Rename share modal to save modal and replace the share icon

Created at 1 month ago

Rename share modal to save modal and replace the share icon

Created at 1 month ago

Add Rail Fence Cipher

Created at 1 month ago

Replace enums by string unions in TypeScript

Created at 1 month ago
Created at 1 month ago
issue comment
Error 310: Rendered more hooks than during the previous render

These assumptions feel strange in occasions like these but at the end they bring us the big performance optimizations we get for free with React & Redux ✨

Created at 2 months ago
issue comment
Error 310: Rendered more hooks than during the previous render

Hi @Kovah! As the error message states React assumes that you always call the same number of hooks in a React component. Note, that you use useSelector in formatNumber, which makes formatNumber a hook, too. In your example usage case you call formatNumber when mapping possibleTrades elements. The number of these elements may change between renders (e.g. in a successful new trade, I guess) leading to this error.

Possible solution: Add numberFormat as a second parameter to formatNumber and retrieve this value once at the top of your React component via useSelector to forward it to the utility function call. This way formatNumber is no hook anymore and can be called with no constraints.

Created at 2 months ago

Add operation and program aliases

Fix the canvas scrolling with the modal when it becomes too large

Fix linting issues

Add dictionary extension with ops Morse code, Navajo code & 2 others

Fix build error & linting issue

Remove tap code from dictionary extension

Finalize Morse code, Navajo code, and Phonetic alphabet operations

Fix linter issue

Fix extension url for dictionary operations

Created at 2 months ago