Skip to content

Commit

Permalink
Use a different naming for the checkout visibility field to prevent t…
Browse files Browse the repository at this point in the history
…he regex from matching the Woo core attribute visibility field with the Germanized related checkout visibility field during imports.
  • Loading branch information
dennisnissle committed Nov 6, 2024
1 parent fcac218 commit f325eef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion includes/export/class-wc-gzd-product-export.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public function export_product_attribute_data( $row, $product, $exporter ) {
$i = 1;
foreach ( $attributes as $attribute_name => $attribute ) {
/* translators: %s: attribute number */
$this->additional_columns[ 'attributes:checkout_visible' . $i ] = sprintf( __( 'Attribute %d visible in checkout', 'woocommerce-germanized' ), $i );
$this->additional_columns[ 'attributes:checkout_visible' . $i ] = sprintf( __( 'Attribute %d checkout visible', 'woocommerce-germanized' ), $i );

if ( is_a( $attribute, 'WC_Product_Attribute' ) ) {
if ( $gzd_attribute = WC_GZD_Product_Attribute_Helper::instance()->get_attribute( $attribute, $product ) ) {
Expand Down
6 changes: 3 additions & 3 deletions includes/import/class-wc-gzd-product-import.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public function get_columns() {
}

public function set_special_columns( $columns ) {
$columns[ __( 'Delivery Time: %s', 'woocommerce-germanized' ) ] = 'delivery_time:';
$columns[ __( 'Nutrients: %s', 'woocommerce-germanized' ) ] = 'nutrients:';
$columns[ __( 'Attribute %d visible in checkout', 'woocommerce-germanized' ) ] = 'attributes:checkout_visible';
$columns[ __( 'Delivery Time: %s', 'woocommerce-germanized' ) ] = 'delivery_time:';
$columns[ __( 'Nutrients: %s', 'woocommerce-germanized' ) ] = 'nutrients:';
$columns[ __( 'Attribute %d checkout visible', 'woocommerce-germanized' ) ] = 'attributes:checkout_visible';

return $columns;
}
Expand Down

0 comments on commit f325eef

Please sign in to comment.