Invalid shipping method, WooCommerce [closed]

May be you have just enabled the ‘Enable shipping’ from shipping options page(Woocommerce -> Settings -> Shipping ). You need to enable the Shipping Methods also. For enabling shipping methods click on shipping method name from shipping methods table displayed on shipping options page. Check the checkbox ‘ Enable this shipping method ‘ and save … Read more

Add my own function to existing WooCommerce hook

storefront_single_post hook pertains only to single posts and not products although products are considered posts of type ‘product’ This is the hook you need: add_action( ‘woocommerce_single_product_summary’, ‘storefront_post_header_categories’, 6 ); function storefront_post_header_categories() { echo “code to display categories here”; } You will find it in plugins/woocommerce/content-single-product.php: /** * woocommerce_single_product_summary hook * * @hooked woocommerce_template_single_title – 5 … Read more

Disable Sidebar in the Product Page in Storefront Theme [closed]

for product page, you can put in functions.php function remove_storefront_sidebar() { if ( is_product() ) { remove_action( ‘storefront_sidebar’, ‘storefront_get_sidebar’, 10 ); } } add_action( ‘get_header’, ‘remove_storefront_sidebar’ ); It works with latest woocommerce 2.5.2 Also CSS is needed: .single-product.right-sidebar .content-area { float: none; margin-right: 0; width: 100%; }

Creating loop within functions.php

Just loop over WP_Query::$posts to get the titles: $option_posts = new WP_Query( [ ‘post_type’ => ‘organisationer’ ] ); $options = []; foreach ( $option_posts->posts as $post ) { $key = “option_{$post->ID}”; $options[ $key ] = apply_filters( ‘the_title’, $post->post_title ); } woocommerce_form_field_radio( ‘custom_field’, array( /* … */ ‘options’ => $options ), $checkout->get_value( ‘custom_field’ ) ); I’m … Read more

display woocommerce all category title on home page

<?php $post_type=”product”; $taxonomies = get_object_taxonomies((object) array( ‘post_type’ => $post_type )); foreach ($taxonomies as $taxonomy) : $terms = get_terms($taxonomy); foreach ($terms as $term) : $term_link = get_term_link($term->term_id); $posts = new WP_Query( “taxonomy=$taxonomy&term=$term->slug&posts_per_page=2″ ); ?> <li> <h2> <a href=”https://wordpress.stackexchange.com/questions/218036/<?php echo $term_link; ?>”><?php echo $term->name; ?></a> </h2> <?php if( $posts->have_posts() ): while( $posts->have_posts() ) : $posts->the_post(); ?> <div> … Read more

Editing Header Titles of each details in woocommerce Order Email [closed]

To change the heading that appears in the body (message) of the email template you can use the following filter: ‘woocommerce_email_heading_’ . $this->id where $this->id equates to the id class property that is set within the email class of the specified type. For example, to change the heading of the “New Order” email you would … Read more

Cannot update WordPress General Settings Site Title and Tagline

Can you check your wp-config.php and double check that you are using the correct database, as if you have changed the values within the wp_options table then they should definitely be reflected in the settings in the back-end of WordPress, whereas, updating from WordPress might not have been saving etc. Sounds like a strange issue … Read more

WooCommerce: display text instead of raw checkbox value email

Try this instead: add_action( “woocommerce_email_after_order_table”, “my_woocommerce_email_after_order_table”, 10, 1); function my_woocommerce_email_after_order_table( $order ) { $my_gift_wrap_checkbox = get_post_meta( $order->id, “my_gift_wrap_checkbox”, true ); $gift_wrap = $my_gift_wrap_checkbox ? ‘Yes please!’ : ‘No thank you.’; echo ‘<p><strong>Gift wrap?: </strong>’ . $gift_wrap . ‘</p>’; if ( $my_gift_wrap_checkbox ) { echo ‘<p><strong>Gift wrap instructions: </strong>’ . get_post_meta( $order->id, “my_gift_wrap_field”, true ) . … Read more