Display text of price (minus 20%) on every product page in a sentence.

Assuming you would put this in a woocommerce template file, wherever you want it to display: <?php global $product; $regular_price = esc_attr( $product->get_display_price() ); $discount = 20; $currency = esc_attr( get_woocommerce_currency() ); $new_price = ($regular_price * $discount) / 100; echo ‘Get this product for ‘.$new_price.$currency.’ with (Promo code)’; ?> Untested, but should do the trick.

Update user_email via php – WP 4.7

I got it to work using $wpdb->update: $ID = $current_user->ID; $email = sanitize_email($_POST[’email’]); $wpdb->update($wpdb->users, array(‘user_email’ => $email), array(‘ID’ => $ID)); Not exactly sure what the issue was with wp_update_user unfortunately.

Child theme not visible in backend

Assuming the parent theme properly enqueues it’s style.css, there is no need for your child them to also enqueue it. As follows: parent themes’s functions.php add_action (‘wp_enqueue_scripts’, ‘parent_enqueue_scripts_styles’) ; function parent_enqueue_scripts_styles () { wp_enqueue_style (‘parent_style’, get_template_directory_uri () . ‘/style.css’) ; return ; } child themes’s functions.php add_action (‘wp_enqueue_scripts’, ‘child_enqueue_scripts_styles’) ; function child_enqueue_scripts_styles () { wp_enqueue_style … Read more