PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.17.0
GiveWP – Donation Plugin and Fundraising Platform v4.17.0
4.17.0 4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 All 256 releases
← All changes | includes/admin/tools/data/class-give-tools-delete-test-transactions.php +26 -18 2.3.2 → 4.17.0 View file →
@@ -23,8 +23,9 @@
23 23 class Give_Tools_Delete_Test_Transactions extends Give_Batch_Export {
24 24
25 25 /**
26 26 * Our export type. Used for export-type specific filters/actions
27 + *
27 28 * @var string
28 29 * @since 1.5
29 30 */
30 31 public $export_type = '';
@@ -30,8 +31,9 @@
30 31 public $export_type = '';
31 32
32 33 /**
33 34 * Allows for a non-form batch processing to be run.
35 + *
34 36 * @since 1.5
35 37 * @var boolean
36 38 */
37 39 public $is_void = true;
@@ -37,8 +39,9 @@
37 39 public $is_void = true;
38 40
39 41 /**
40 42 * Sets the number of items to pull on each step
43 + *
41 44 * @since 1.5
42 45 * @var integer
43 46 */
44 47 public $per_step = 30;
@@ -69,9 +72,9 @@
69 72 }
70 73
71 74 $offset = ( $this->step - 1 ) * $this->per_step;
72 75 $step_items = array_slice( $items, $offset, $this->per_step );
73 - $meta_table = __give_v20_bc_table_details( 'payment' );
76 + $meta_table = give_v20_bc_table_details( 'payment' );
74 77
75 78 if ( $step_items ) {
76 79 foreach ( $step_items as $item ) {
77 80 // Delete the main payment.
@@ -91,9 +94,11 @@
91 94 */
92 95 public function get_percentage_complete() {
93 96
94 97 $items = $this->get_stored_data( 'give_temp_delete_test_ids', false );
95 - $total = count( $items );
98 + $total = is_array( $items )
99 + ? count( $items )
100 + : 0;
96 101
97 102 $percentage = 100;
98 103
99 104 if ( $total > 0 ) {
@@ -183,23 +188,26 @@
183 188
184 189 if ( false === $items ) {
185 190 $items = array();
186 191
187 - $args = apply_filters( 'give_tools_reset_stats_total_args', array(
188 - 'post_status' => 'any',
189 - 'number' => - 1,
190 - 'meta_query' => array(
191 - 'relation' => 'OR',
192 - array(
193 - 'key' => '_give_payment_mode',
194 - 'value' => 'test',
192 + $args = apply_filters(
193 + 'give_tools_reset_stats_total_args',
194 + array(
195 + 'post_status' => 'any',
196 + 'number' => - 1,
197 + 'meta_query' => array(
198 + 'relation' => 'OR',
199 + array(
200 + 'key' => '_give_payment_mode',
201 + 'value' => 'test',
202 + ),
203 + array(
204 + 'key' => '_give_payment_gateway',
205 + 'value' => 'manual',
206 + ),
195 207 ),
196 - array(
197 - 'key' => '_give_payment_gateway',
198 - 'value' => 'manual',
199 - ),
200 - ),
201 - ) );
208 + )
209 + );
202 210
203 211 $posts = new Give_Payments_Query( $args );
204 212 $payments = $posts->get_payments();
205 213
@@ -250,9 +258,9 @@
250 258 *
251 259 * @since 1.5
252 260 *
253 261 * @param string $key The option_name
254 - * @param mixed $value The value to store
262 + * @param mixed $value The value to store
255 263 *
256 264 * @return void
257 265 */
258 266 private function store_data( $key, $value ) {
@@ -293,9 +301,9 @@
293 301 * Unset the properties specific to the donors export.
294 302 *
295 303 * @since 2.3.0
296 304 *
297 - * @param array $request
305 + * @param array $request
298 306 * @param Give_Batch_Export $export
299 307 */
300 308 public function unset_properties( $request, $export ) {
301 309 if ( $export->done ) {