Closed (fixed)
Project:
UC Payflow Pro
Version:
6.x-1.1-beta4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Aug 2009 at 18:36 UTC
Updated:
31 Aug 2009 at 16:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
kwinters commentedYou can disable them globally in the gateway settings, or simply remove the recurring schedule from the product at admin/store/settings/uc_recurring/products.
Comment #2
cjdavis commentedSorry, that was a poorly stated question. I've never turned on the recurring payments feature, but there the recurring transactions tab is visible to the customer accounts at user/%/pfp_cpanel. Even worse, it displays an error to customer accounts:
Looking at the code in uc_payflowpro.module, user/%/pfp_cpanel is added whether recurring transactions are enabled or not. Simply wrapping it in a 'if( variable_get('uc_payflowpro_enable_recurring', 0) ) {' check and flushing the menu cache appears to do what I need. Is this the correct approach?
I've attached a patch for this - my first actual patchfile - is the format correct?
Comment #3
kwinters commentedAh, that's completely different :) This is a good improvement.
I can't think of anything else major to change. Removing the menu callback entirely means we don't need to check in the tab's code, since it can't be executed. The cache has to be cleared manually after the setting is changed, but I don't think that's very avoidable or particularly important in practice.
As far as creating a patch goes, it's easiest for the maintainer if you have the CVS version checked out and diff against that, but for smaller patches like this it's easy enough for me to work around. Usually any patch is better than none, though.
Committed to both D5 and D6 branches, with some modifications to the D5 version. I'm not going to create a new beta until we have some more changes, though. You should be fine with your local mods for now, or you can check out the dev version from CVS (which would be good anyway if you're going to create any more patches).