change woocommerce product statut (draft ->publish // publish->draft) depends on the month [closed]

date(‘M’) => ‘Aug’ and date(‘m’) => 08 add_action(‘wp’, function(){ $current_month = date(‘M’); if( $current_month == ‘Aug’ ) { wp_update_post( array( ‘ID’ => “product_id”, ‘post_status’ => ‘publish’ )); } else { wp_update_post( array( ‘ID’ => “product_id”, ‘post_status’ => ‘draft’ )); } });

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