How disable some product features on woocomerce?

Just add below function in your function file /*For remove tab from product tab*/ function remove_linked_products($tabs){ unset($tabs[‘inventory’]); unset($tabs[‘shipping’]); return($tabs); } add_filter(‘woocommerce_product_data_tabs’, ‘remove_linked_products’, 10, 1); /*Remove Virtual and Downloadeble checkbox*/ function remove_product_type_options( $options ) { unset( $options[‘virtual’] ); unset( $options[‘downloadable’] ); return $options; } add_filter( ‘product_type_options’, ‘remove_product_type_options’ );

how can i add an additional action into woocommerce admin order page through my plugin?

You can use this code to add an action on the admin order page: const CUSTOM_ACTION_CODE = “my-plugin__custom-action-code”; add_filter(“woocommerce_order_actions”, function ($actions) { $actions[CUSTOM_ACTION_CODE] = “label of the custom action”; return $actions; }); add_action(“woocommerce_order_action_” . CUSTOM_ACTION_CODE, function (\WC_Order $order) { // here the code of the treatement of $order //… });

Changing the order of custom fields in the dashboard for Woocommerce variable products [closed]

The meta box template for the variations is defined in the file html-variation-admin.php. There you will find the hook “woocommerce_variation_options_pricing”. With this hook you can add your input field to the desired place. function variation_settings_fields($loop, $variation_data, $variation) { // Your Text Field woocommerce_wp_text_input( array( ‘id’ => ‘_text_field[‘ . $variation->ID . ‘]’, ‘label’ => __(‘My Text … Read more

woocommerce related product title length

Problem solve based on this article https://designsmaz.com/how-to-short-woocommerce-products-title/#comment-76957 Basically I just replace the <?php the_title(); ?> to <?php $shorttitle = mb_substr(the_title(”,”,FALSE),0,45); echo $shorttitle; if (strlen($shorttitle) >44){ echo ‘&hellip;’; } ?>

Can’t Change WooCommerce Default Language to Spanish (Mexico)

Oh god…I just tried to “Update Translations” and now it just magically works…so frustrating… So if this happens to anyone, you don’t need to download anything…just set your language in wordpress under General, go to the Updates section and at the bottom you will see language updates. Update those files and the WooCommerce language files … Read more

Apply WordPress function on specific woocommerce product categories only

You’re trying to use $product_cat_id even though it isn’t defined anywhere. If you want to know the current category being viewed you need to use is_product_category(6), but you need to use that inside the callback function (ChangeSelectTitle()), because WordPress hasn’t determined whether it’s a category archive yet when it runs functions.php. function ChangeSelectTitle($woocommerce_product_categories_widget_args) { if … Read more