@@ 868-896 (lines=29) @@ | ||
865 | * |
|
866 | * @param int $order_id |
|
867 | */ |
|
868 | public function display_order_fee( $order_id ) { |
|
869 | if ( apply_filters( 'wc_stripe_hide_display_order_fee', false, $order_id ) ) { |
|
870 | return; |
|
871 | } |
|
872 | ||
873 | $order = wc_get_order( $order_id ); |
|
874 | ||
875 | $fee = WC_Stripe_Helper::get_stripe_fee( $order ); |
|
876 | $currency = WC_Stripe_Helper::get_stripe_currency( $order ); |
|
877 | ||
878 | if ( ! $fee || ! $currency ) { |
|
879 | return; |
|
880 | } |
|
881 | ||
882 | ?> |
|
883 | ||
884 | <tr> |
|
885 | <td class="label stripe-fee"> |
|
886 | <?php echo wc_help_tip( __( 'This represents the fee Stripe collects for the transaction.', 'woocommerce-gateway-stripe' ) ); ?> |
|
887 | <?php esc_html_e( 'Stripe Fee:', 'woocommerce-gateway-stripe' ); ?> |
|
888 | </td> |
|
889 | <td width="1%"></td> |
|
890 | <td class="total"> |
|
891 | - <?php echo wc_price( $fee, array( 'currency' => $currency ) ); ?> |
|
892 | </td> |
|
893 | </tr> |
|
894 | ||
895 | <?php |
|
896 | } |
|
897 | ||
898 | /** |
|
899 | * Displays the net total of the transaction without the charges of Stripe. |
|
@@ 905-933 (lines=29) @@ | ||
902 | * |
|
903 | * @param int $order_id |
|
904 | */ |
|
905 | public function display_order_payout( $order_id ) { |
|
906 | if ( apply_filters( 'wc_stripe_hide_display_order_payout', false, $order_id ) ) { |
|
907 | return; |
|
908 | } |
|
909 | ||
910 | $order = wc_get_order( $order_id ); |
|
911 | ||
912 | $net = WC_Stripe_Helper::get_stripe_net( $order ); |
|
913 | $currency = WC_Stripe_Helper::get_stripe_currency( $order ); |
|
914 | ||
915 | if ( ! $net || ! $currency ) { |
|
916 | return; |
|
917 | } |
|
918 | ||
919 | ?> |
|
920 | ||
921 | <tr> |
|
922 | <td class="label stripe-payout"> |
|
923 | <?php echo wc_help_tip( __( 'This represents the net total that will be credited to your Stripe bank account. This may be in the currency that is set in your Stripe account.', 'woocommerce-gateway-stripe' ) ); ?> |
|
924 | <?php esc_html_e( 'Stripe Payout:', 'woocommerce-gateway-stripe' ); ?> |
|
925 | </td> |
|
926 | <td width="1%"></td> |
|
927 | <td class="total"> |
|
928 | <?php echo wc_price( $net, array( 'currency' => $currency ) ); ?> |
|
929 | </td> |
|
930 | </tr> |
|
931 | ||
932 | <?php |
|
933 | } |
|
934 | } |
|
935 |