Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

How to add custom fields data in a woocommerce webhook WordPress

  • REFUNDED

How to add custom fields meta_data in a woocommerce webhook

i would like to get meta data with key = numero_de_suivis and create a new value called tracking_number


meta_data
0 {...}
2 {...}
3 {...}
4 {
id: 0000
key: numero_de_suivis
value: my_value
}
tracking_number: my_value




add_action('woocommerce_webhook_payload', 'my_woocommerce_webhook_payload');

function my_woocommerce_webhook_payload($payload) {

$payload["tracking_number"] = // add the meta_data with key = "numero_de_suivis" here

return $payload;
}

Answers (0)

No answers yet.