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

Questions about meta box: nonce and parameters available

Not sure about nonces. As for arguments it is probably their usage of add_meta_box(): $callback_args (array) (optional) Arguments to pass into your callback function. The callback will receive the $post object and whatever parameters are passed through this variable. Default: null So $post is post object and $box is whatever they are passing in $callback_args

Widget instance options not showing correctly

i finally found the answer, its actually not a problem with the code i posted. its in the update() function. i have some validation code function update($new_instance, $old_instance) { $instance[‘title’] = esc_attr(strip_tags($new_instance[‘title’])); if (is_int($new_instance[‘number_products’])) { if ($new_instance[‘number_products’] > 0) $instance[‘number_products’] = $new_instance[‘number_products’]; else $instance[‘number_products’] = 1; } else { $instance[‘number_products’] = $old_instance[‘number_product’]; } return $instance; … Read more