title: Why is not get_post_meta working?
body: <p>i am using following get_post_meta function but it is not showing any values, it is showing blank result</p>
  
  <pre><code>$meta_values = get_post_meta( $post_id, 'salary', true );
  </code></pre>
  
  <p>I am able to see the value present in phpmyadmin .I am using it in a <strong>plugin</strong> in <strong>action(save_post,sftoproject)</strong>, but it is showing any value in my code.</p>
  
  <p>Here's my code</p>
  
  <pre><code>add_action('save_post','user_sf_project');
  function user_sf_project($post_id){
  $SOAP_CLIENT_BASEDIR = plugin_dir_path(__FILE__).'Force.com-Toolkit-for-PHP/soapclient/';
  require_once ($SOAP_CLIENT_BASEDIR.'/SforcePartnerClient.php');
  require_once ($SOAP_CLIENT_BASEDIR.'/SforceHeaderOptions.php');
  require_once ('Force.com-Toolkit-for-PHP/Samples/userAuth.php');
  
  try {
    $mySforceConnection = new SforcePartnerClient();
    $mySoapClient =  $mySforceConnection-&gt;createConnection($SOAP_CLIENT_BASEDIR.'/partner.wsdl.xml');
    $mylogin = $mySforceConnection-&gt;login("username", "password");
  
    $postdata = get_post($post_id);
    $meta_values = get_post_meta( $post_id, 'salary', true );
    $fields = array (
      'Name' =&gt; $post_id,
      'First_Name__c' =&gt; $postdata-&gt;post_title,
      'Salary__c' =&gt; $meta_values,
    );
  
    $sObject = new SObject();
    $sObject-&gt;fields = $fields;
    $sObject-&gt;type = 'NewObject__c';
  
    $createResponse = $mySforceConnection-&gt;create(array($sObject));
  
    print_r($createResponse);
  
    $ids = array();
    foreach ($createResponse as $createResult) {
      print_r($createResult);
      array_push($ids, $createResult-&gt;id);
    }
  
  } catch (Exception $e) {
  echo $mySforceConnection-&gt;getLastRequest();
  echo $e-&gt;faultstring;
  }
  </code></pre>