strangerstudios / pmpro-payfast

Add the South African payment processing service PayFast as a gateway option for Paid Memberships Pro.
https://www.paidmembershipspro.com/add-ons/payfast-payment-gateway/
5 stars 13 forks source link

ON HOLD: Simplify the Insert and Update methods #28

Closed pbrocks closed 4 years ago

pbrocks commented 6 years ago

the insert and update methods pass things through the same kind of prepare process

https://github.com/strangerstudios/pmpro-payfast/blob/dev/services/payfast_itn_handler.php#L371-L383

it basically just makes a prepare insert query https://github.com/WordPress/WordPress/blob/master/wp-includes/wp-db.php#L2177-L2180 wp-includes/wp-db.php:2177-2180 ``$sql = "$type INTO$table` ($fields) VALUES ($formats)";

    $this->check_current_query = false;
    return $this->query( $this->prepare( $sql, $values ) );```

WordPress/WordPressAdded by GitHub

there are no filters or anything in there. so the only reason to use insert, update, replace/etc methods is if you like the format for setting the tables/etc or just for readability of the code