Category: eCommerce
fb代码
WWOF v3: Force “View Cart” link in the success side-popup to open in the same tab
/** * WWOF v3: Force “View Cart” link in the success side-popup to open in the same tab. */ add_action( ‘wp_footer’, ‘wwof_v3_view_cart_same_tab_script’, 999 ); function wwof_v3_view_cart_same_tab_script() { ?>Continue reading
WWOF – Force Default Quantity to 0 and Auto-tick the Add to Cart Checkbox
/** * WWOF v3 (Ant Design Vue): Force default qty to 0 and auto-tick the Add to Cart checkbox * (Supports both manual typing and up/down arrow clicks) */ add_action( ‘wp_footer’, ‘wwof_v3_antdesign_qty_checkbox_script_final’, 999 ); function wwof_v3_antdesign_qty_checkbox_script_final() { ?>Continue reading
Untitled Snippet
Test update snippet
test asdasdasdasd updatedContinue reading
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
[No Longer Required] Enable Additional Order Dynamic Data Endpoints for RD Theme Woo Order Received Page
function rd_get_valid_received_order() { static $order = null; static $checked = false; if ( $checked ) { return $order; } $checked = true; if ( ! function_exists( ‘wc_get_order’ ) ) { return null; } global $wp; if ( empty( $wp )…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