WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: ClassiPress Google Checkout Gateway] Bug Wipes out additional gateways (1 post)

  1. Wil
    Member
    Posted 2 years ago #

    The Google Checkout Classipress gateway plugin sets the $action_gateway_values array in the function gcheckout_add_gateway_values() which has the potential for wiping out other additional payment gateways that also need to update this global array.

    A better way would be to populate a separate array, test to see if the $action_gateway_values array exists and then merge the two arrays together if true, otherwise, replace.

    Here's the altered code:
    [Code moderated as per the Forum Rules. Please use the pastebin]

    The altered code populates a new array called $my_action_gateway_values.

    At the end the new array is merged with the global array if it exists.

    Cheerz,
    Wil.

Topic Closed

This topic has been closed to new replies.

About this Topic