Uncategorized

Bulk Order Cancelled In WooCommerce

add_filter( ‘bulk_actions-edit-shop_order’, ‘wdo_register_bulk_action’ ); // edit-shop_order is the screen ID of the orders page function wdo_register_bulk_action( $bulk_actions ) { $bulk_actions[‘mark_cancel_order’] = ‘Mark Order Cancel’; // Mark Cancel Order return $bulk_actions; } add_action( ‘admin_action_mark_cancel_order’, ‘wdo_bulk_process_custom_status’ ); // admin_action_{action name} function wdo_bulk_process_custom_status() { // if an array with order IDs is not presented, exit the function if(

Register New Taxonomy or Assign existing Taxonomy to Custom Post Type

// Register New taxonomy for existing CUSTOM POST TYPE add_action(‘init’, ‘wdo_tag_for_cpt_post_type’); function wdo_tag_for_cpt_post_type(){ //register taxonomy for custom post type register_taxonomy( ‘your_taxomony_name’, //taxonomy ‘your_post_type’, //post-type for which registering Taxomony array( ‘hierarchical’ => false, ‘label’ => __( ‘Tags’,’taxonomy general name’), ‘singular_name’ => __( ‘Tag’, ‘taxonomy general name’ ), ‘rewrite’ => array( ‘slug’ => ‘your_taxonomy_slug’ ), ‘query_var’ =>

Show Additional Bank Detail on WooCommerce Thank you page

Looking for custom code to show Additional Bank related detail on WooCommerce Thank you page while Payment Method – BACS (Online Bank Transfer). By using below code you able to show Mobile Number on Thank you page while your user selected payment method – Online Bank Transfer add_filter( ‘woocommerce_bacs_account_fields’, ‘wdo_mono_field_bacs_account_field’, 10, 2); function wdo_mono_field_bacs_account_field( $account_fields,

Disable WooCommerce Payment Gateways Based On Cart Amount

If you want to disable payment gateway based on Cart total and show only specific Payment method if cart amount higher than specific amount than using country in WooCommerce filter woocommerce_available_payment_gateways you able to easily apply in your WooCommerce wordpress website add_filter( ‘woocommerce_available_payment_gateways’, ‘wdo_filter_gateways’, 1); function wdo_filter_gateways( $gateways ){ if ( WC()->cart->prices_include_tax ) $cart_contents_total =

Back button / Return button link to shop page woocommerce

If you would like to show the Back to Shop button on the single product page, than use this following line of code at the end of your theme’s functions.php file of your active child theme (or theme) and Save the file. add_action( ‘woocommerce_after_add_to_cart_button’, ‘custom_go_back_shop’, 10 ); function custom_go_back_shop() { global $product; echo ‘ Back

Scroll to Top