Bestellnummer aus Rechnung
-
Hallo liebes Germanized Team,
ich habe eure tolle Anleitung über Shortcodes in Rechnungen gefunden und möchte hiermit Metadaten von Woocommerce Buchungen hinzufügen. Hierfür benötige ich die Bestellnummer.
Könnt ihr mir vielleicht sagen, wie ich in eurer Funktion auf die Bestellnummer zugreifen kann?add_filter( ‘storeabill_document_item_product_data_shortcode_result’, ‘my_child_adjust_document_item_product_shortcode’, 10, 4 );
function my_child_adjust_document_item_product_shortcode( $result, $atts, $document, $shortcodes ) {
if ( $atts[‘data’] !== ‘my_product_attribute’ ) {
return $result;
}if ( $product = $shortcodes->get_document_item_product() ) {
if ( $product->is_callable( ‘get_attribute’ ) ) {
return $result;
}
$result = $product->get_attribute( $atts[‘data’] );
}return $result;
}Vielen Dank für eure Hilfe.
Viele Grüße
Andreas
- The topic ‘Bestellnummer aus Rechnung’ is closed to new replies.