This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'woe_get_order_fields', 'my_child_add_order_export_data' ); | |
| function my_child_add_order_export_data( $fields ) { | |
| $fields['invoice_numbers'] = array( 'label' => 'Invoice Numbers', 'colname' => 'Invoice Numbers', 'checked' => 1 ); | |
| return $fields; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'storeabill_invoice_get_template', function( $template, $invoice ) { | |
| $template_id = false; | |
| if ( ! empty( $invoice->get_company() ) ) { | |
| $template_id = 320; // Post id of the template to be used | |
| } | |
| if ( $template_id ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'woocommerce_gzd_disable_gateways_paid_order_email', function( $gateways ) { | |
| $gateways = array_diff( $gateways, array( 'invoice' ) ); | |
| return $gateways; | |
| } ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action( 'woocommerce_order_status_pending_to_processing_notification', function( $order_id ) { | |
| if ( $order = sab_get_order( $order_id ) ) { | |
| if ( $invoice = $order->get_latest_finalized_invoice() ) { | |
| $invoice->send_to_admin(); | |
| } | |
| } | |
| }, 10 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'storeabill_woo_order_email', function( $billing_email, $invoice_order ) { | |
| $wc_order = $invoice_order->get_order(); | |
| return $billing_email; | |
| }, 10, 2 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'woocommerce_stc_dhl_label_customer_reference', 'my_child_adjust_dhl_customer_reference', 10, 3 ); | |
| function my_child_adjust_dhl_customer_reference( $ref, $label, $shipment ) { | |
| $ref = $shipment->get_order_number(); | |
| return $ref; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action( 'storeabill_woo_order_synced_invoice', function( $invoice, $sab_order ) { | |
| $woo_order = $sab_order->get_order(); | |
| // Check products and determine whether to use a custom journal type | |
| $condition = false; | |
| if ( $condition ) { | |
| $custom_journal_type = 'custom_invoice'; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'woocommerce_shiptastic_shipment_order_needs_shipping', 'my_child_check_if_order_needs_shipping', 10, 3 ); | |
| function my_child_check_if_order_needs_shipping( $needs_shipping, $order, $order_shipment ) { | |
| foreach ( $order->get_shipping_methods() as $shipping_method ) { | |
| if ( 'cod' === $shipping_method->get_method_id() ) { | |
| $needs_shipping = false; | |
| break; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'woocommerce_shiptastic_shipments_table_columns', 'my_child_add_shipment_columns', 10 ); | |
| function my_child_add_shipment_columns( $columns ) { | |
| $columns['order_status'] = 'Order status'; | |
| return $columns; | |
| } | |
| add_filter( 'woocommerce_shiptastic_shipments_table_custom_column', 'my_child_shipment_order_status_column', 10, 2 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'woocommerce_shiptastic_shipment_statuses', function( $statuses ) { | |
| $statuses['custom-status'] = 'My custom status'; | |
| return $statuses; | |
| } ); |
NewerOlder