pronamic / wp-pay-core

Core components for the WordPress payment processing library. This library is used in the WordPress plugin Pronamic Pay: https://www.pronamicpay.com/, but also allows other plugin developers to set up a payment plugin.
https://www.wp-pay.org/
GNU General Public License v3.0
27 stars 3 forks source link

Checkbox field type bugfix #36

Closed knit-pay closed 3 years ago

knit-pay commented 3 years ago

In Payment gateways like "ogone-directlink" if we check the checkbox, it gets updated when we save it. But if we try to uncheck and save it, it does not get updated. This is the bug fix for the same.

coveralls commented 3 years ago

Coverage Status

Coverage decreased (-0.002%) to 15.401% when pulling 75f2aa0ce1a550b278dbe28b5a7ab4c0b8f267a6 on knit-pay:bug-fix into 23cc893fee69a7509d3dad6fe73c5ce21bd26303 on wp-pay:develop.

codecov-io commented 3 years ago

Codecov Report

Merging #36 (75f2aa0) into develop (e1ec4da) will decrease coverage by 0.05%. The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop      #36      +/-   ##
=============================================
- Coverage      18.17%   18.11%   -0.06%     
- Complexity      2601     2604       +3     
=============================================
  Files            102      102              
  Lines           9053     9080      +27     
=============================================
  Hits            1645     1645              
- Misses          7408     7435      +27     
Impacted Files Coverage Δ Complexity Δ
src/Admin/AdminGatewayPostType.php 0.00% <ø> (ø) 46.00 <0.00> (ø)
src/Settings.php 0.00% <0.00%> (ø) 5.00% <0.00%> (ø%)
src/Admin/AdminModule.php 0.00% <0.00%> (ø) 87.00% <0.00%> (ø%)
src/Admin/AdminSettings.php 0.00% <0.00%> (ø) 17.00% <0.00%> (ø%)
src/Subscriptions/SubscriptionsModule.php 0.00% <0.00%> (ø) 117.00% <0.00%> (+3.00%)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e1ec4da...75f2aa0. Read the comment docs.

knit-pay commented 3 years ago

Hi @remcotolsma, Have you checked it? Is the change I made helpful?

remcotolsma commented 3 years ago

Thanks for your patience. We don't know if it's always ok to delete settings that are not posted. That's why we fixed this differently for now: https://github.com/wp-pay/core/commit/17195bec4b51b2146b219f1e1791dc7894bc54d6.