Serial Number from custom table not appear in woocommerce_email_before_order_table action

Looks like I found the issue. It was the fact that ‘woocommerce_payment_complete’ hook was too early BUT the hook ‘woocommerce_pre_payment_complete‘ is called first after payment is made but before order status change and before the email is sent. 🙂 So all I changed in the add_action was change: woocommerce_payment_complete’ TO woocommerce_pre_payment_complete that’s it. And it … Read more

Custom Database Table and foreach

Assuming you have table that’s prefixed with the WordPress prefix (even if it’s not the default one), and the table is called table. Then the following code should select everything, and allow you to go through each row. In this example, it goes through each row and outputs the content of the field foobar. global … Read more

What is wrong here? Issue with post_id and meta_value

You’re close, but not quite. Try it like this: function jb_applicant() { $custom_fields = get_post_custom(2171); $op = ”; foreach ( $custom_fields as $key => $value ) { $op .= $key . ” => ” . $value . “<br />”; } return $op; } add_shortcode(‘applicant’, ‘jb_applicant’);

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)