crslz
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Show sidebar wdget only on shop page not category archivesHi, use conditional tags
is_shop()
Returns true when on the product archive page (shop).is_product_category()
Returns true when viewing a product category archive.Forum: Plugins
In reply to: [WooCommerce] Problem with product categories in menu section of wordpressMy apologies, I thought it was a front-end problem.
The categories act like children from their parent category. Did you already checked the (parent) categories if they have children?
products -> categories
wp-admin/edit-tags.php?taxonomy=product_cat&post_type=productForum: Plugins
In reply to: [WooCommerce] Customizie woocommerce shop+hide sidebarHi,
WordPress themes are made up of different templates, so you will need to edit the templates where a sidebar is displayed.
You can use this plugin to find out the correct template files
For example, in a typical WordPress theme you may need to edit index.php, page.php, single.php, archive.php, home.php and so on.
Open a template file to edit it and then locate the line that looks like this:
<?php get_sidebar(); ?>
If your theme comes with multiple sidebars, then you will see different instances of this code with a sidebar name inside the function. For example:
<?php get_sidebar(‘footer-widget-area’); ?>
Delete the line that represents the sidebar that you don’t want to display.
Now, save and upload the file back to your website. Repeat the process for all template files responsible for displaying different pages on your website.
Once finished, you can go to your website and see it in action.
You may notice that while sidebars are gone, your content area is still appearing with the same width leaving the sidebar area empty.
Forum: Plugins
In reply to: [WooCommerce] Emails are not sent for every change of order statusHi there!
First, you’ll want to see if the emails are being correctly generated and sent. You can do this by installing a plugin like [WP Mail Logging](https://www.ads-software.com/plugins/wp-mail-logging/), and placing a test order.
If the emails are being generated, there’s a good chance that the site’s server is blocking them from being sent.
If the emails aren’t being generated, most likely, something is conflicting with WooCommerce. This document goes over how to check for conflicts.
Forum: Plugins
In reply to: [WooCommerce] Problem with product categories in menu section of wordpressHi,
Can you provide a url? looks like styling is broken
Forum: Plugins
In reply to: [WooCommerce] Cancel Order Button inside mailHi,
Customize WooCommerce Order Emails
1) Override a custom Email WooCommerce Template
– First you make sure that the following directory exists in the WordPress installation: wp-content/themes/your-theme/woocommerce/emails.
– Next, copy the file found at wp-content/plugins/woocommerce/templates/emails/… into the store’s theme at: your-theme/woocommerce/emails/.
– Finally, edit your-theme/woocommerce/emails/…2) Conditional Customization with Actions/Filters
– The most effective approach to customizing emails is to work with WooCommerce custom code. This obviously requires a high-level of expertise in PHP.
WC_Order::get_cancel_order_url() – Generates a URL so that a customer can cancel their (unpaid – pending) order.
Forum: Plugins
In reply to: [WooCommerce] redirect customer after purchaseDid you do add code to your functions.php? be sure to look for closing PHP tags (they look like: ?>).
If your theme file ends in one of these, you need to make sure you put custom code above it.
function redirect( $order_get_id ){ $order = wc_get_order( $order_get_id ); $url = home_url('/profil'); if ( ! $order->has_status( 'failed' ) ) { wp_safe_redirect( $url ); exit; } } add_action( 'woocommerce_thankyou', 'redirect');
Forum: Plugins
In reply to: [WooCommerce] redirect customer after purchasefunction redirect( $order_get_id ){ $order = wc_get_order( $order_get_id ); $url = 'https://www.yoursite.com/'; if ( ! $order->has_status( 'failed' ) ) { wp_safe_redirect( $url ); exit; } } add_action( 'woocommerce_thankyou', 'redirect');
Forum: Plugins
In reply to: [WooCommerce] Internal emails sent for order status changewp-admin/admin.php?page=wc-settings&tab=email
enable/disable
Forum: Plugins
In reply to: [WooCommerce] Scripts are loaded// CSS files
woocommerce-layout.css
woocommerce-smallscreen.css
woocommerce.css// JavaScript files
add-to-cart.min.js
jquery.blockUI.min.js
woocommerce.min.js
jquery.cookie.min.js
cart-fragments.min.jsdisable all above scripts except cart, checkout, my-account and product page.
//* Enqueue scripts and styles add_action( 'wp_enqueue_scripts', 'disable_woocommerce_loading_css_js' ); function disable_woocommerce_loading_css_js() { // Check if WooCommerce plugin is active if( function_exists( 'is_woocommerce' ) ){ // Check if it's any of WooCommerce page if(! is_woocommerce() && ! is_cart() && ! is_checkout() ) { ## Dequeue WooCommerce styles wp_dequeue_style('woocommerce-layout'); wp_dequeue_style('woocommerce-general'); wp_dequeue_style('woocommerce-smallscreen'); ## Dequeue WooCommerce scripts wp_dequeue_script('wc-cart-fragments'); wp_dequeue_script('woocommerce'); wp_dequeue_script('wc-add-to-cart'); wp_deregister_script( 'js-cookie' ); wp_dequeue_script( 'js-cookie' ); } } }
Put above code into your theme’s functions.php file and save your changes.
Look for the ‘content-product.php’ file inside your parent theme folder. Copy the file to your child theme and make the adjustments.
Forum: Plugins
In reply to: [WooCommerce] ATTACH STATIC PDF TO ORDER CONFIRMATION EMAILadd_filter( 'woocommerce_email_attachments', 'attach_terms_conditions_pdf_to_email', 10, 3); function attach_terms_conditions_pdf_to_email ( $attachments , $id, $object ) { $allowed_statuses = array( 'new_order', 'customer_invoice', 'customer_processing_order', 'customer_completed_order' ); if( isset( $id ) && in_array ( $id, $allowed_statuses ) ) { $your_pdf_path = get_template_directory() . '/terms.pdf'; $attachments[] = $pdf_path; } return $attachments; }
- This reply was modified 5 years, 4 months ago by crslz.
Forum: Plugins
In reply to: [WooCommerce] Shop_coupon: make the expiry date column sortableproblem SOLVED, thanks!!
Forum: Plugins
In reply to: [WooCommerce] how to hide/remove “Reviews” title in Reviews tabCopy the ‘single-product-reviews.php’ file from the woocommerce plugin folder to your theme folder and make the desired adjustments.