Can’t display product categories on woocommerce getting Invalid taxonomy?

it’s was working fine last 2 installation Those two installation might still be on WordPress prior to version 4.5.0, and according to the reference: Since 4.5.0, taxonomies should be passed via the ‘taxonomy’ argument in the $args array So: $args = array( ‘orderby’ => ‘title’, ‘order’ => ‘ASC’, ‘taxonomy’ => ‘product_cat’, ); $categories = get_terms( … Read more

WooCommerce add custom product_type_option

Your code only creates the checkbox, you need also to save the value like that add_filter(“product_type_options”, function ($product_type_options) { $product_type_options[“wildcard”] = [ “id” => “_wildcard”, “wrapper_class” => “show_if_simple”, “label” => “Wildcard”, “description” => “Description”, “default” => “no”, ]; return $product_type_options; }); add_action(“save_post_product”, function ($post_ID, $product, $update) { update_post_meta( $product->ID , “_wildcard” , isset($_POST[“_wildcard”]) ? “yes” … Read more

Disable add to cart button when product is out of stock

Here are some plugins which provide the facilities to hide “Add To Cart” buttons from the shop and single product page in woocommerce, [ https://wordpress.org/plugins/hide-add-to-cart-button/) ] [ https://wordpress.org/plugins/remove-add-to-cart-woocommerce/ ] These plugins will do, 1) Hide Add to Cart button from product single page. 2) Hide Add to Cart button from category page. 3) Hide Add … Read more

How to get _POST variable on WooCommerce product page (form on homepage)

I think you can maybe use $_SESSIONS or a $_GET var. Option 1: (I think this will work best for you situation) function redirect_form() { if (isset($_POST[“var1”]) && !empty($_POST[“var1”]) && isset($_POST[“var2”]) && isset($_POST[“var3”]) && !empty($_POST[“var3”])) { $_SESSION[‘var2’] = htmlentities(stripslashes(trim($_POST[“var2”])), ENT_QUOTES); if ($_POST[“var1”] == ‘product1’){ wp_redirect(home_url(‘/products/product1/’)); exit; ///// And In your price adjustment call function return_custom_price($price, … Read more

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