Undefined variable & issue with smof_data

The variable $alignment is only being set conditionally by the following lines: if ( metadata_exists( ‘post’, $post_id, ‘pyre_page_title_text_alignment’ ) && get_post_meta( get_queried_object_id(), ‘pyre_page_title_text_alignment’, TRUE ) != ‘default’ ) { $alignment = get_post_meta( $post_id, ‘pyre_page_title_text_alignment’, TRUE ); } elseif ( $smof_data[‘page_title_alignment’] ) { $alignment = $smof_data[‘page_title_alignment’]; } If neither the if() nor the elseif() conditions are … Read more

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 ); ?>