how can i update my postmeta without losing old data?

The saving logic should be like this <?php global $post; $get_my_meta = get_post_meta($post->ID, ‘my_meta’, true); $post_meta_name = get_post_meta($post->ID, ‘name-en’,true); $meta = [ ‘name’ => $post_meta_name, ‘chap’ => $season[‘quality_serie’] ]; $updatemeta = [ $get_my_meta, $meta ]; add_post_meta($post->ID, ‘my_meta’, $meta, true); ?> And the loop logic should be like this <?php $first_link = get_post_meta($post->ID, ‘my_meta’); if ($first_link) … Read more

I have 3 types of prices in WP and I need to change price for each specific user role using hooks

I know this isn’t the answer you’re looking for – but you’re setting yourself up for quite a bit of work. The Woocommerce Wholesale Suite does exactly what you need flawlessly without all the extra work (aswell as role specific payment methods / shipping methods). https://en-gb.wordpress.org/plugins/woocommerce-wholesale-prices/

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