Changeset 2024971
- Timestamp:
- 02/05/2019 03:06:45 AM (7 years ago)
- File:
-
- 1 edited
-
parvenu/trunk/parvenu.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
parvenu/trunk/parvenu.php
r2020171 r2024971 77 77 if ( !$parvenu_retailer_info ){ 78 78 $store_admin = get_user_by('id', 1); 79 $ daily_status= array(79 $parvenu_retailer_info = array( 80 80 'first_name' => get_user_meta( 1, 'billing_first_name', true ) ? get_user_meta( 1, 'billing_first_name', true ) : '', 81 81 'last_name' => get_user_meta( 1, 'billing_last_name', true ) ? get_user_meta( 1, 'billing_last_name', true ) : '', … … 376 376 add_action( 'woocommerce_payment_complete', 'woo_payment_complete_parvenu' ); 377 377 function woo_payment_complete_parvenu( $order_id ){ 378 $order = new WC_Order($order_id);379 378 $order = new WC_Order( $order_id ); 380 379 $items = $order->get_items(); … … 384 383 $product = wc_get_product( $item['product_id'] ); 385 384 $product_price = ($item['qty']) * ($product->get_price()); 386 $donation_amt = get_woocommerce_currency_symbol(). $product_price;387 385 388 386 if (get_post_meta( $item['product_id'], 'charity_id', true )) { … … 403 401 'BillingZip' => ( !empty( $retailer_info['zip'] ) ) ? $retailer_info['zip'] : '', 404 402 'CharityName' => ( !empty( $product->get_name() ) ) ? $product->get_name() : '', 405 'TotalAmount' => $donation_amt, 403 'CurrencySymbol' => get_woocommerce_currency_symbol(), 404 'TotalAmount' => (float)$product_price, 406 405 'Time' => gmdate("Y-m-d H:i:s") 407 406 )
Note: See TracChangeset
for help on using the changeset viewer.