-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Work in progress: Initiating work around invoice number meta box for …
…orders
- Loading branch information
1 parent
3b2d2c4
commit 7f11105
Showing
2 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
declare(strict_types = 1); | ||
|
||
if ( ! defined( 'ABSPATH' ) ) { | ||
exit; | ||
} | ||
|
||
$wc_order = wc_get_order( $_GET['post'] ); | ||
|
||
$invoice_number = $wc_order->get_meta( '1984_woo_dk_invoice_number', true, 'edit' ); | ||
$credit_invoice_number = $wc_order->get_meta( '1984_woo_dk_credit_invoice_number', true, 'edit' ); | ||
|
||
?> | ||
|
||
<div> | ||
<div> | ||
<label>Invoice Number</label> | ||
<input | ||
name="1984_woo_dk_invoice_number" | ||
type="text" | ||
value="<?php echo esc_attr( $invoice_number ); ?>" | ||
/> | ||
</div> | ||
<div> | ||
<button class="button button-small button-secondary">Set Invoice Number</button> | ||
<button class="button button-small button-primary">Create in DK</button> | ||
</div> | ||
</div> | ||
|
||
<div> | ||
<label>Credit Invoice Number</label> | ||
<input | ||
name="1984_woo_dk_credit_invoice_number" | ||
type="text" | ||
value="<?php echo esc_attr( $credit_invoice_number ); ?>" | ||
/> | ||
<div> | ||
<button class="button button-small button-secondary">Set Credit Invoice Number</button> | ||
</div> | ||
</div> |