Exclude Specific Products from Parent Category

/** * Exclude specific products from appearing in their parent category. */ add_action(‘woocommerce_product_query’, ‘exclude_specific_products_from_parent_category’); function exclude_specific_products_from_parent_category($q) { // Only apply this on the parent category archive page if (!is_product_category(‘telt-og-pavilloner’)) { // Replace with your parent category slug return; } //…Continue reading

Hide RD Theme Woo Additional Order Info Wrapping Column when No Additional Order Info Present

(function () { function rdToggleAdditionalOrderInfoColumn() { var container = document.getElementById(‘rd-additional-order-info’); if (!container) { return; } if (!container.querySelector(‘.awb-woo-order-additional-info’)) { container.style.display = ‘none’; } } if (document.readyState === ‘loading’) { document.addEventListener(‘DOMContentLoaded’, rdToggleAdditionalOrderInfoColumn); } else { rdToggleAdditionalOrderInfoColumn(); } })();Continue reading

Add a button to customer data

add_action( ‘woocommerce_admin_order_data_after_billing_address’, ‘custom_customer_history_search_button_blue’, 10, 1 ); function custom_customer_history_search_button_blue( $order ) { // Vásárló e-mail címének lekérése $customer_email = $order->get_billing_email(); if ( $customer_email ) { // A keresési URL összeállítása $search_url = admin_url( ‘edit.php?s=’ . urlencode( $customer_email ) . ‘&post_type=shop_order’ );…Continue reading