add default values for admin address filters (#44704)
* add default values for "woocommerce_admin_shipping_fields" and "woocommerce_admin_billing_fields" filters * use null instead
This commit is contained in:
parent
5a761ae05e
commit
e8a403b406
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Add default values for 'woocommerce_admin_billing_fields' and 'woocommerce_admin_shipping_fields' filters
|
|
@ -84,7 +84,7 @@ class CheckoutFieldsAdmin {
|
|||
* @param string $context The context to show the fields for.
|
||||
* @return array
|
||||
*/
|
||||
public function admin_address_fields( $fields, $order, $context = 'edit' ) {
|
||||
public function admin_address_fields( $fields, $order = null, $context = 'edit' ) {
|
||||
if ( ! $order instanceof \WC_Order ) {
|
||||
return $fields;
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ class CheckoutFieldsAdmin {
|
|||
* @param string $context The context to show the fields for.
|
||||
* @return array
|
||||
*/
|
||||
public function admin_contact_fields( $fields, $order, $context = 'edit' ) {
|
||||
public function admin_contact_fields( $fields, $order = null, $context = 'edit' ) {
|
||||
if ( ! $order instanceof \WC_Order ) {
|
||||
return $fields;
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ class CheckoutFieldsAdmin {
|
|||
* @param string $context The context to show the fields for.
|
||||
* @return array
|
||||
*/
|
||||
public function admin_additional_fields( $fields, $order, $context = 'edit' ) {
|
||||
public function admin_additional_fields( $fields, $order = null, $context = 'edit' ) {
|
||||
if ( ! $order instanceof \WC_Order ) {
|
||||
return $fields;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue