WooCommerce 3 get custom variation on process order [closed]

Okay I find solution for this one!! Add field to the each product variation with this one github Remi Corson And because I have a custom gateway plugin for WooCommerce I found there where products are initiated and use foreach to get ‘productId’ for each product. There I use $variation = $item[‘variation_id’]; $productVariation = get_post_custom($variation); … Read more

How to make url variable?

Assuming the user’s mobile number is saved in wp_usermeta with meta_key being mobile_number, then adding this to a template will show the current user’s mobile number: <?php echo get_user_meta( get_current_user_id(), ‘mobile_number’, true ); ?>

Add class to all meta boxes for a custom post type

After doing some playing around, I discovered this can actually be accomplished by defining the name of the hook I want to add the filter to via a variable. So if my $post_type_name is portfolio and my $box_id is piece_info, I can make a filter as follows: function add_meta_box_class( $classes ) { array_push( $classes, ‘custom-class’); … Read more

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