wp_customize – detect post type to show/hide customizer options

Customizer Controls can be displayed based on context. With active_callback API introduced in WordPres 4.0, you can control where to show your specific options. Add your customizer options like this with the optional active_callback argument. $wp_customize->add_control( ‘wc_cart_page_option’, array( ‘label’ => esc_html__( ‘Cart Page Options’ ), ‘section’ => ‘wc_cart’, ‘active_callback’ => ‘estore_is_cart’, )); Now create a … Read more

WooCommerce Custom Product to checkout

You need first to buy WooCommerce Quick View plugin, because woocommerce lightbox plugin doesn’t work without it. Please read this: Woocommerce single product show in modal…? And if you go to the wordpress page of woocommerce lightbox plugin, you will see that is a complementary plugin.

Remove the link from the thumbnail and product title on woocommerce

It’s a bit hard to tell without knowing what shop theme you are using but I’ll try anyways…  The code <?php wc_get_template_part( ‘content’, ‘product’ ); ?> is basically calling the template file content-product.php. I would however not recommend you alter the default file. On a standard woocommerce install you will find that default template file … Read more

Query Strings and Woocommerce

I think that I figured this out. In my functions.php file I had the below function to redirect to the checkout page when a product is added to the cart. So I captured the username variable there and then added it to the redirected URL: add_filter (‘add_to_cart_redirect’, ‘redirect_to_checkout’); function redirect_to_checkout() { global $woocommerce; $checkout_url = … Read more

How to change a column width on WooCommerce orders page (Admin)

To set a different column width for the Ship to, add this to your functions.php: add_action( ‘admin_head’, ‘wpse_237354_ship_to_column’ ); function wpse_237354_ship_to_column() { global $pagenow; if ( $pagenow == ‘edit.php’ ) { ?> <style type=”text/css”> .manage-column.column-shipping_address { width: 10px; } </style> <?php } } This adds custom CSS in the header page with your new column … Read more