|
@@ 76-96 (lines=21) @@
|
| 73 |
|
|
| 74 |
|
$done = true; |
| 75 |
|
|
| 76 |
|
if ( 0 < count( $orders ) ) { |
| 77 |
|
foreach ( $orders as $order ) { |
| 78 |
|
$data_to_export[] = array( |
| 79 |
|
'group_id' => 'woocommerce_orders', |
| 80 |
|
'group_label' => __( 'Orders', 'woocommerce-gateway-stripe' ), |
| 81 |
|
'item_id' => 'order-' . $order->get_id(), |
| 82 |
|
'data' => array( |
| 83 |
|
array( |
| 84 |
|
'name' => __( 'Stripe payment id', 'woocommerce-gateway-stripe' ), |
| 85 |
|
'value' => get_post_meta( $order->get_id(), '_stripe_source_id', true ), |
| 86 |
|
), |
| 87 |
|
array( |
| 88 |
|
'name' => __( 'Stripe customer id', 'woocommerce-gateway-stripe' ), |
| 89 |
|
'value' => get_post_meta( $order->get_id(), '_stripe_customer_id', true ), |
| 90 |
|
), |
| 91 |
|
), |
| 92 |
|
); |
| 93 |
|
} |
| 94 |
|
|
| 95 |
|
$done = 10 > count( $orders ); |
| 96 |
|
} |
| 97 |
|
|
| 98 |
|
return array( |
| 99 |
|
'data' => $data_to_export, |
|
@@ 141-161 (lines=21) @@
|
| 138 |
|
|
| 139 |
|
$done = true; |
| 140 |
|
|
| 141 |
|
if ( 0 < count( $subscriptions ) ) { |
| 142 |
|
foreach ( $subscriptions as $subscription ) { |
| 143 |
|
$data_to_export[] = array( |
| 144 |
|
'group_id' => 'woocommerce_subscriptions', |
| 145 |
|
'group_label' => __( 'Subscriptions', 'woocommerce-gateway-stripe' ), |
| 146 |
|
'item_id' => 'subscription-' . $subscription->get_id(), |
| 147 |
|
'data' => array( |
| 148 |
|
array( |
| 149 |
|
'name' => __( 'Stripe payment id', 'woocommerce-gateway-stripe' ), |
| 150 |
|
'value' => get_post_meta( $subscription->get_id(), '_stripe_source_id', true ), |
| 151 |
|
), |
| 152 |
|
array( |
| 153 |
|
'name' => __( 'Stripe customer id', 'woocommerce-gateway-stripe' ), |
| 154 |
|
'value' => get_post_meta( $subscription->get_id(), '_stripe_customer_id', true ), |
| 155 |
|
), |
| 156 |
|
), |
| 157 |
|
); |
| 158 |
|
} |
| 159 |
|
|
| 160 |
|
$done = 10 > count( $subscriptions ); |
| 161 |
|
} |
| 162 |
|
|
| 163 |
|
return array( |
| 164 |
|
'data' => $data_to_export, |