/** * Add a custom product data tab */ add_filter( ‘woocommerce_product_tabs’, ‘woo_new_product_tab’ ); function woo_new_product_tab( $tabs ) { // Adds the new tab $tabs[‘test_tab’] = array( ‘title’ => __( ‘New Product Tab’, ‘woocommerce’ ), ‘priority’ => 50, ‘callback’ => ‘woo_new_product_tab_content’…Continue reading
// For non-recurring function mepr_stripe_payment_descriptor( $args ){ $args[ ‘statement_descriptor’ ] = ‘Custom Descriptor’; // max 22 chars return $args; } add_filter( ‘mepr_stripe_payment_intent_args’, ‘mepr_stripe_payment_descriptor’, 10 );Continue reading
function mepr_cust_registration_input( $product_id ) { $post_id = url_to_postid( wp_get_referer() ); if( isset( $post_id ) && $post_id ) { $input_str = ““; echo $input_str; } } add_action( ‘mepr-checkout-before-submit’, ‘mepr_cust_registration_input’ ); function mepr_cust_thankyou_url_params( $url, $args ) { if ( isset( $_REQUEST[ ‘mepr_cust_current_page_id’…Continue reading
/** * Snippet Name: Remove the Order Notes field section from the WooCommerce checkout. * Snippet Author: ecommercehints.com */ add_filter( ‘woocommerce_enable_order_notes_field’, ‘__return_false’, 9999 ); add_filter( ‘woocommerce_checkout_fields’ , ‘remove_order_notes’ ); function remove_order_notes( $fields ) { unset($fields[‘order’][‘order_comments’]); return $fields; }Continue reading
add_action( ‘woocommerce_check_cart_items’, ‘required_min_cart_subtotal_amount’ ); function required_min_cart_subtotal_amount() { // HERE Set minimum cart total amount $minimum_amount = 200; // Total (before taxes and shipping charges) $cart_subtotal = WC()->cart->subtotal; // Add an error notice is cart total is less than the minimum…Continue reading
/** * Update Cart Automatically on Quantity Change * * @author Misha Rudrastyh * @url https://rudrastyh.com/woocommerce/remove-update-cart-button.html */ add_action( ‘wp_head’, function() { ?>Continue reading
function my_wp_nav_menu_args( $args = ” ) { if( is_user_logged_in() ) { $args[‘menu’] = ‘logged-in’; } else { $args[‘menu’] = ‘logged-out’; } return $args; } add_filter( ‘wp_nav_menu_args’, ‘my_wp_nav_menu_args’ );Continue reading
add_action( ‘manage_shop_order_posts_custom_column’ , ‘custom_orders_list_column_content’, 50, 2 ); function custom_orders_list_column_content( $column, $post_id ) { global $the_order, $post; if ( $column == ‘shipping_address’ ) { if( $phone = $the_order->get_billing_phone() ){ $phone_wp_dashicon = ‘ ‘; echo ‘‘. $phone.’‘; } } if ( ‘order_status’…Continue reading