To jest Poziom deweloperski dokument. Jeśli nie jesteś zaznajomiony z kodem/szablonami i rozwiązywaniem potencjalnych konfliktów, skontaktuj się z programistą zaznajomionym z FooSales i/lub WooCommerce. Te fragmenty są dostarczane jako uprzejmość i mają służyć jako punkt wyjścia do pomocy w określonych potrzebach dostosowywania. Nie jesteśmy w stanie zapewnić wsparcia dla dostosowań w ramach naszych Warunki świadczenia usług.
Przechwytywanie opłat Square podczas realizacji zamówienia #
If you’re using a third-party export plugin to export your orders and you’re processing payments with Square, you might want to include the fees that Square deducts from the payment in your sales export. This help document previously contained a code snippet that captured Square processing fees as meta data upon order completion. This, however, didn’t support split payments and since the structure of plugin 1.40.0+ has been completely overhauled, the code snippet will no longer function. The functionality contained within the code snippet has been added to the plugin’s core functionality which also supports split payments and various order submit statuses in plugin version 1.40.2
Uwaga that if you previously added the code snippet to your functions.php file, you must remove it to prevent critical errors when submitting orders through FooSales.
You can read more about how Square fees are captured in our Square Payment Integration help document.
Dodaj notatkę zamówienia z FooSales do wiadomości e-mail administratora WooCommerce. #
Dodaj następujący fragment kodu do motywu functions.php jeśli chcesz, aby "Notatka o zamówieniu" dodana do zamówienia w FooSales była wyświetlana w wiadomościach e-mail administratora WooCommerce.
add_action( 'woocommerce_email_order_meta', 'woo_add_order_notes_to_email', 10, 4 ); function woo_add_order_notes_to_email($order, $sent_to_admin, $plain_text, $email) { if ( isset($post->ID) ) $id = $post->ID; else $id = $order->ID; if ($sent_to_admin && 'foosales_app' === get_post_meta($id, '_foosales_order_source', true)) { $args = array( 'order_id' => $id, 'type' => '' ); $notes = wc_get_order_notes( $args ); echo '<h2>' . __( 'Uwagi do zamówienia', 'woocommerce' ) . '</h2>'; echo '<ul class="order_notes">'; if ( $notes ) { ?> <li> <div class="note_content"> <?php echo wpautop( wptexturize( wp_kses_post( $notes[count($notes)-1]->content ) ) ); ?> </div> </li> <?php } else { echo '<li>' . __( 'Nie ma jeszcze notatek dla tego zamówienia.', 'woocommerce' ) . '</li>'; } echo '</ul>'; } }