Problem with cURL and rest API

The curl_init function accepts an url and what you are passing there looks like a command line call. Please check this link for an example of passing username and password through php curl functionality. Basically you have to use just http://localhost/wp-json/wc/v1/products in curl_init and set username using curl_setopt function with CURLOPT_USERPWD parameter. Example: $ch = … Read more

how to use different page design for different category

For overriding default templates please check this. If you want different/custom category template for specific category then you may create a php file which has naming structure like taxonomy-product_cat-{slug}.php. For example, to create custom category template for clothing category, you will need to create taxonomy-product_cat-clothing.php where clothing is slug of the category. Place this file … Read more

Woocommerce – remove sale price field from dashboard [closed]

You cannot remove the field using a code but you can disable using the sale price across the store. To disable sale price function custom_wc_get_sale_price( $sale_price, $product ) { return $product->get_regular_price(); return $sale_price; } add_filter( ‘woocommerce_get_sale_price’, ‘custom_wc_get_sale_price’, 50, 2 ); add_filter( ‘woocommerce_get_price’, ‘custom_wc_get_sale_price’, 50, 2 ); To hide this field, you can use a CSS … Read more

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