Skip to content

Instantly share code, notes, and snippets.

View actualityextensions's full-sized avatar

Actuality Extensions actualityextensions

View GitHub Profile
@actualityextensions
actualityextensions / wc-point-of-sale-receipt-header.php
Last active April 23, 2020 10:34
Support to pass through information to POS receipt header
<?php
// Support to pass through information to POS receipt header
add_filter( 'wc_pos_receipt_header_text', 'change_pos_receipt_header_text', 10, 3 );
function change_pos_receipt_header_text( $header_text, $order, $register ) {
$header_text = 'This is an updated header text.';
return $header_text;
}
@actualityextensions
actualityextensions / wc-point-of-sale-receipt-footer.php
Last active April 23, 2020 10:34
Support to pass through information to POS receipt footer
@actualityextensions
actualityextensions / wc-point-of-sale-order-updated.php
Last active March 19, 2024 17:29
This snippet is the starting point for extending your plugin's functionality in response to POS order updates.
<?php
// Support to trigger after POS order is updated.
add_action('wc_pos_order_updated', function($order_id) {
$order = wc_get_order($order_id);
if ($order) {
// Implement your custom logic here.
// This can range from sending notification emails,
// updating order metadata, making API calls,