Skip to content

Commit

Permalink
PhP8 Array Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Dernerd committed Oct 19, 2023
1 parent 30e833e commit 9383735
Show file tree
Hide file tree
Showing 4 changed files with 4,845 additions and 4,844 deletions.
2 changes: 1 addition & 1 deletion includes/admin/class-mp-setup-wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ public function init_metaboxes() {
) );

// Create field for each canadian province
foreach ( mp()->CA_provinces as $key => $label ) {
foreach ( mp()->provinces['CA'] as $key => $label ) {
$metabox->add_field( 'text', array(
'name' => 'tax[canada_rate][' . $key . ']',
'desc' => '<a target="_blank" href="http://en.wikipedia.org/wiki/Sales_taxes_in_Canada">' . __( 'Current Rates', 'mp' ) . '</a>',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private function __construct() {
add_filter( 'psource_field/format_value/tax[rate]', array( &$this, 'format_tax_rate_value' ), 10, 2 );
add_filter( 'psource_field/sanitize_for_db/tax[rate]', array( &$this, 'save_tax_rate_value' ), 10, 3 );

foreach ( mp()->CA_provinces as $key => $value ) {
foreach ( mp()->provinces['CA'] as $key => $value ) {
add_filter( 'psource_field/format_value/tax[canada_rate][' . $key . ']', array( &$this, 'format_tax_rate_value' ), 10, 2 );
add_filter( 'psource_field/sanitize_for_db/tax[canada_rate][' . $key . ']', array( &$this, 'save_tax_rate_value' ), 10, 3 );
}
Expand Down Expand Up @@ -465,7 +465,7 @@ public function init_tax_settings() {
) );

// Create field for each canadian province
foreach ( mp()->CA_provinces as $key => $label ) {
foreach ( mp()->provinces['CA'] as $key => $label ) {
$metabox->add_field( 'text', array(
'name' => 'tax[canada_rate][' . $key . ']',
'desc' => '<a target="_blank" href="http://en.wikipedia.org/wiki/Sales_taxes_in_Canada">' . __( 'Aktuelle Steuersätze', 'mp' ) . '</a>',
Expand Down Expand Up @@ -655,7 +655,8 @@ public function init_location_settings() {
'validation' => array(
'required' => true,
),
) );
)
);
}

}
Expand Down
Loading

0 comments on commit 9383735

Please sign in to comment.