Skip to content

Commit 6c87fd6

Browse files
committed
WPCS Updates
1 parent 60a5850 commit 6c87fd6

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

includes/classes/class-confirm-payment.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ protected function update_payment_dates( $data ) {
237237
$paystack_ref = $data->reference;
238238
$paid_at = $data->transaction_date;
239239
if ( 'optional' === $this->meta['recur'] || 'plan' === $this->meta['recur'] ) {
240+
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
240241
$wpdb->update(
241242
$table,
242243
array(
@@ -253,6 +254,7 @@ protected function update_payment_dates( $data ) {
253254
} else {
254255
// If this the price paid was free, or if it was a variable amount.
255256
if ( 0 === (int) $this->oamount || 1 === $this->meta['usevariableamount'] ) {
257+
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
256258
$wpdb->update(
257259
$table,
258260
array(
@@ -274,6 +276,7 @@ protected function update_payment_dates( $data ) {
274276
'result' => 'failed',
275277
];
276278
} else {
279+
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
277280
$wpdb->update(
278281
$table,
279282
array(

includes/classes/class-form-submit.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,8 @@ public function submit_action() {
309309
'txn_code' => $code,
310310
'metadata' => wp_json_encode( $this->fixed_metadata ),
311311
);
312-
312+
313+
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
313314
$exist = $wpdb->get_results(
314315
$wpdb->prepare(
315316
"SELECT *
@@ -333,6 +334,7 @@ public function submit_action() {
333334
);
334335

335336
if ( count( $exist ) > 0 ) {
337+
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
336338
$wpdb->update(
337339
$table,
338340
array(
@@ -344,6 +346,7 @@ public function submit_action() {
344346
)
345347
);
346348
} else {
349+
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
347350
$wpdb->insert(
348351
$table,
349352
$insert

includes/classes/class-helpers.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,7 @@ public function get_db_record( $code, $column = 'txn_code' ) {
585585
global $wpdb;
586586
$return = false;
587587
$table = $wpdb->prefix . PFF_PAYSTACK_TABLE;
588+
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
588589
$record = $wpdb->get_results(
589590
$wpdb->prepare(
590591
"SELECT *
@@ -790,6 +791,7 @@ public function generate_new_code( $length = 10 ) {
790791
public function check_code( $code ) {
791792
global $wpdb;
792793
$table = $wpdb->prefix . PFF_PAYSTACK_TABLE;
794+
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
793795
$o_exist = $wpdb->get_results(
794796
$wpdb->prepare(
795797
"SELECT * FROM %i WHERE txn_code = %s",

includes/classes/class-retry-submit.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ protected function update_retry_code() {
184184
$this->new_code,
185185
$this->code
186186
);
187+
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
187188
$return = $wpdb->query( $sql );
188189
return $return;
189190
}

0 commit comments

Comments
 (0)