Created
September 13, 2022 15:24
-
-
Save apeschar/fe0a1a2dc2ace0b9b30e306e76d09b01 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
--- /tmp/raq/request-quote-table-old.php 2022-09-13 15:21:33.046041261 +0000 | |
+++ /tmp/raq/request-quote-table-new.php 2022-09-13 15:21:25.442164874 +0000 | |
@@ -122,6 +122,12 @@ | |
if ( ! empty( $attributes ) ) { | |
foreach ( $attributes as $name => $value ) { | |
+ if ( $value instanceof WC_Product_Attribute ) { | |
+ $value = array_map( function ( $term ) { | |
+ return $term->name; | |
+ }, $value->get_terms() ); | |
+ $value = implode( ', ', $value ); | |
+ } | |
$raq_data[ 'attribute_' . $name ] = $value; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment