Move deprecation warning to separate plugin
This commit is contained in:
parent
fffb2d72e9
commit
6b2d8fdee3
3 changed files with 17 additions and 6 deletions
|
@ -6,6 +6,13 @@ Deduplication is moved from individual plugins to a plugin that does that. If
|
|||
you want to keep deduplication of cart items, and you probably do want that,
|
||||
add `deduplicate` to `revbank.plugins` just below `repeat`.
|
||||
|
||||
The deprecation warning was moved from the `withdraw` plugin to a new plugin
|
||||
called `deprecated_raw`. If you're upgrading from an older versions and some of
|
||||
your users have been around since before the withdraw/unlisted split, you may
|
||||
want to keep the deprecation warning. But for new RevBank installations it does
|
||||
not make sense. To keep providing these warnings to users that enter raw
|
||||
amounts, add `deprecated_raw` to the very end of `revbank.plugins`.
|
||||
|
||||
# (2022-12-25) RevBank 3.6
|
||||
|
||||
## Update your `revbank.plugins`
|
||||
|
|
10
plugins/deprecated_raw
Normal file
10
plugins/deprecated_raw
Normal file
|
@ -0,0 +1,10 @@
|
|||
#!perl
|
||||
|
||||
sub command :Tab(withdraw) ($self, $cart, $command, @) {
|
||||
if (defined eval { parse_amount($command) }) {
|
||||
warn "Note: raw amounts for withdrawal or unlisted products are no longer supported.\n\n";
|
||||
warn "Please use the 'withdraw' command to take money out of your revbank account, or\n";
|
||||
warn "the 'unlisted' command to pay for an unlisted product.\n\n";
|
||||
}
|
||||
return NEXT;
|
||||
}
|
|
@ -3,12 +3,6 @@
|
|||
HELP1 "withdraw <amount>" => "Withdraw from your account";
|
||||
|
||||
sub command :Tab(withdraw) ($self, $cart, $command, @) {
|
||||
if (defined eval { parse_amount($command) }) {
|
||||
warn "Note: raw amounts for withdrawal or unlisted products are no longer supported.\n\n";
|
||||
warn "Please use the 'withdraw' command to take money out of your revbank account, or\n";
|
||||
warn "the 'unlisted' command to pay for an unlisted product.\n\n";
|
||||
}
|
||||
|
||||
$command eq 'withdraw' or return NEXT;
|
||||
|
||||
return "Amount to withdraw from your account", \&amount;
|
||||
|
|
Loading…
Add table
Reference in a new issue