wp_create_category deprecated?

You are most probably trying to use wp_create_category() on the front end, which will lead to the fatal error. wp_create_category() is not available on the front end, only backend. You should hook your function to at least admin_init where wp_create_category() is available. Just a note, looking at the source code, wp_create_category() uses category_exists() which is … Read more

Replacing a deprecated filter ‘woocommerce_get_price’ with ‘woocommerce_product_get_price’

It’s hard to find because the hook name is generated dynamically. All the get_ functions in the WooCommerce product class, like $product->get_price(), use the get_prop() method under the hood. This is part of the WC_Data class that WC_Product extends. At the end of get_prop() the filters are applied like this: apply_filters( $this->get_hook_prefix() . $key, $value, … Read more

Display only author posts in dashboard all posts panel

The following worked for me to show only the current user’s posts in the admin add_action( ‘load-edit.php’, ‘posts_for_current_author’ ); function posts_for_current_author() { global $user_ID; /*if current user is an ‘administrator’ do nothing*/ //if ( current_user_can( ‘add_users’ ) ) return; /*if current user is an ‘administrator’ or ‘editor’ do nothing*/ if ( current_user_can( ‘edit_others_pages’ ) ) … Read more

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