How to change a column width on WooCommerce orders page (Admin)

To set a different column width for the Ship to, add this to your functions.php: add_action( ‘admin_head’, ‘wpse_237354_ship_to_column’ ); function wpse_237354_ship_to_column() { global $pagenow; if ( $pagenow == ‘edit.php’ ) { ?> <style type=”text/css”> .manage-column.column-shipping_address { width: 10px; } </style> <?php } } This adds custom CSS in the header page with your new column … Read more

Unable to update Woocommerce Product Permalink

Add this code to your functions.php– add_action( ‘init’, ‘the_drmatist_category_base’ ); function the_drmatist_category_base() { // Remember to flush the rules once manually after you added this code! add_rewrite_rule( // The regex to match the incoming URL ‘news/([^/]+)/([^/]+)/([^/][^f][^e][^e][^d]+)(/[0-9]+)?/?$’, //here my changes to exclude ‘feed’ // The resulting internal URL ‘index.php?product_cat=$matches[1]/$matches[2]&name=$matches[3]&paged=$matches[4]’, // Add the rule to the top … Read more

how i can add more required * fields in checkout page?

If you at least know how to open your “functions.php” file, the following should work if you simply add it at the bottom of your functions.php file of your (child-)theme: // Hook in add_filter( ‘woocommerce_checkout_fields’ , ‘custom_add_checkout_fields’ ); // Our hooked in function – $fields is passed via the filter! function custom_add_checkout_fields( $fields ) { … Read more

remove categories from product

I have found the solution, actually it is very simple: $terms = get_the_terms($product_id, ‘product_cat’); foreach($terms as $term){ wp_remove_object_terms($product_id, $term->term_id, ‘product_cat’); } This code get all the therms with the ‘product_cat’ taxonomy, with a foreach loop I remove all the items.

Place Order button in Checkout

This question has been answered here. Basically, you want to use a switch statement hooked to the gettext filter. One benefit of this method is, if you need to change more text down the line you can just add another case to the function. For example: add_filter( ‘gettext’, ‘wpsx_replace_text_string’, 20, 3 ); function wpsx_replace_text_string( $translated_text, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)