Skip to content

Commit

Permalink
Fix manufacturer slug import.
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisnissle committed Oct 2, 2024
1 parent d95d4a3 commit 7b999c8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
16 changes: 13 additions & 3 deletions includes/import/class-wc-gzd-product-import.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,15 +287,13 @@ public function import( $product, $data ) {
$value = $data[ $column_name ];

if ( has_filter( "woocommerce_gzd_product_import_column_{$column_name}" ) ) {

/**
* Filter that allows adjusting product import data for a certain `$column_name`.
*
* @param WC_Product $product The product object
* @param mixed $value The import value.
*
* @since 1.8.5
*
*/
$product = apply_filters( "woocommerce_gzd_product_import_column_{$column_name}", $product, $value );
} elseif ( is_callable( array( $this, "set_column_value_{$column_name}" ) ) ) {
Expand Down Expand Up @@ -534,7 +532,19 @@ public function parse_term( $name, $taxonomy, $output = 'term_id' ) {
* @param WC_Product $product
* @param $value
*
* @return mixed
* @return WC_Product
*/
public function set_column_value_manufacturer( $product, $value ) {
wc_gzd_get_gzd_product( $product )->set_manufacturer_slug( $value );

return $product;
}

/**
* @param WC_Product $product
* @param $value
*
* @return WC_Product
*/
public function set_column_value_delivery_time( $product, $value ) {
wc_gzd_get_gzd_product( $product )->set_default_delivery_time_slug( $value );
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Furthermore we customized the WooCommerce checkout to make your store meet the b
* *Delayed conclusion of contract (Pro)* - By default a contract is concluded right after submitting the WooCommerce checkout. Germanized offers you to delay that contract and manually check the order before concluding the contract.
* *VAT ID check for WooCommerce (Pro)* - Provide additional fields within checkout, customer account and registration form to automatically validate the VAT ID based on the EU API.
* *Multistep Checkout (Pro)* - Adjusts the default single-page-checkout within WooCommerce to support a multistep checkout without overriding templates for optimal theme support.
* *GPSR compliance* - Add manufacturer information and safety documents to your products

= Germanized for WooCommerce is certified by Trusted Shops =
Germanized has been approved by Trusted Shops and therefor offers best technical conditions to operate a legally binding WooCommerce Shop in Germany.
Expand Down

0 comments on commit 7b999c8

Please sign in to comment.