WooCommerce Product Settings: Enabling Loop Custom Discount Options with Checkbox and Input Field – No Plugin

// Add checkbox and input field to general tab add_action(‘woocommerce_product_options_general_product_data’, ‘add_custom_fields_to_general_tab’); function add_custom_fields_to_general_tab() { global $post; // Retrieve the current values of the checkbox and input field $checked = get_post_meta($post->ID, ‘_allow_discount’, true); $required_quantity = get_post_meta($post->ID, ‘_required_quantity’, true); // Output the…Continue reading

WooCommerce Product Settings: Enabling Custom Discount Options with Checkbox and Input Field First set quantity only – No Plugin

// Add checkbox and input field to general tab add_action(‘woocommerce_product_options_general_product_data’, ‘add_custom_fields_to_general_tab’); function add_custom_fields_to_general_tab() { global $post; // Retrieve the current values of the checkbox and input field $checked = get_post_meta($post->ID, ‘_allow_discount’, true); $required_quantity = get_post_meta($post->ID, ‘_required_quantity’, true); // Output the…Continue reading

to add WooCommerce WhatsApp Product Enquiry. NO API Used.

/* Plugin Name: SuperWp WhatsApp Product Enquiry Description: Adds a WhatsApp enquiry button to WooCommerce product pages with customizable options, custom messages, and phone number input. Version: 1.0.3 Author: Thiarara SuperWP */ // Add WooCommerce Submenu for WhatsApp Enquiry Settings…Continue reading

to add WordPress WooCommerce WhatsApp checkout

// Exit if accessed directly if (!defined(‘ABSPATH’)) { exit; } // Check if WooCommerce is active if (!in_array(‘woocommerce/woocommerce.php’, apply_filters(‘active_plugins’, get_option(‘active_plugins’)))) { add_action(‘admin_notices’, ‘superwp_wc_not_active_notice’); function superwp_wc_not_active_notice() { ?>Continue reading

Show WooCommerce Cart and Checkout on the Same page Free No Plugin

// 1. Add Woocommerce cart page on the checkout page add_action( ‘woocommerce_before_checkout_form’, ‘add_cart_on_checkout’, 5 ); function add_cart_on_checkout() { if ( is_wc_endpoint_url( ‘order-received’ ) ) return; echo do_shortcode(”); // Woocommerce cart page shortcode } // 2. Redirect cart page to checkout…Continue reading

How to Allow WordPress WooCommerce Direct Order to WhatsApp Free.

// Add custom checkbox and WhatsApp number fields to product edit page add_action(‘woocommerce_product_options_general_product_data’, ‘add_whatsapp_order_fields’); function add_whatsapp_order_fields() { woocommerce_wp_checkbox(array( ‘id’ => ‘allow_whatsapp_order’, ‘label’ => __(‘Allow WhatsApp Order’, ‘text-domain’), ‘description’ => __(‘Check this box to enable WhatsApp ordering for this product.’, ‘text-domain’),…Continue reading

Allow SVG Files Upload

/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading