@@ 102-122 (lines=21) @@ | ||
99 | ||
100 | $done = true; |
|
101 | ||
102 | if ( 0 < count( $orders ) ) { |
|
103 | foreach ( $orders as $order ) { |
|
104 | $data_to_export[] = array( |
|
105 | 'group_id' => 'woocommerce_orders', |
|
106 | 'group_label' => __( 'Orders', 'woocommerce-gateway-stripe' ), |
|
107 | 'item_id' => 'order-' . $order->get_id(), |
|
108 | 'data' => array( |
|
109 | array( |
|
110 | 'name' => __( 'Stripe payment id', 'woocommerce-gateway-stripe' ), |
|
111 | 'value' => get_post_meta( $order->get_id(), '_stripe_source_id', true ), |
|
112 | ), |
|
113 | array( |
|
114 | 'name' => __( 'Stripe customer id', 'woocommerce-gateway-stripe' ), |
|
115 | 'value' => get_post_meta( $order->get_id(), '_stripe_customer_id', true ), |
|
116 | ), |
|
117 | ), |
|
118 | ); |
|
119 | } |
|
120 | ||
121 | $done = 10 > count( $orders ); |
|
122 | } |
|
123 | ||
124 | return array( |
|
125 | 'data' => $data_to_export, |
|
@@ 167-187 (lines=21) @@ | ||
164 | ||
165 | $done = true; |
|
166 | ||
167 | if ( 0 < count( $subscriptions ) ) { |
|
168 | foreach ( $subscriptions as $subscription ) { |
|
169 | $data_to_export[] = array( |
|
170 | 'group_id' => 'woocommerce_subscriptions', |
|
171 | 'group_label' => __( 'Subscriptions', 'woocommerce-gateway-stripe' ), |
|
172 | 'item_id' => 'subscription-' . $subscription->get_id(), |
|
173 | 'data' => array( |
|
174 | array( |
|
175 | 'name' => __( 'Stripe payment id', 'woocommerce-gateway-stripe' ), |
|
176 | 'value' => get_post_meta( $subscription->get_id(), '_stripe_source_id', true ), |
|
177 | ), |
|
178 | array( |
|
179 | 'name' => __( 'Stripe customer id', 'woocommerce-gateway-stripe' ), |
|
180 | 'value' => get_post_meta( $subscription->get_id(), '_stripe_customer_id', true ), |
|
181 | ), |
|
182 | ), |
|
183 | ); |
|
184 | } |
|
185 | ||
186 | $done = 10 > count( $subscriptions ); |
|
187 | } |
|
188 | ||
189 | return array( |
|
190 | 'data' => $data_to_export, |