I wish to update values in commerce_payment_transaction entity. I am using such code:

&lt;?php
$transaction = commerce_payment_transaction_load(58);
 $digests = array(
'DIGEST' =&gt; '456',
'DIGEST2' =&gt; '478'
);

$transaction_wrapper = entity_metadata_wrapper('commerce_payment_transaction', $transaction);
$transaction_wrapper-&gt;payload-&gt;set($digests);
$transaction_wrapper-&gt;field_my_custom_field-&gt;set(1458);
$transaction_wrapper-&gt;save();


The problem is, that such code throws me error, that payload is not property of commerce_payment_transaction entity. Although "payload" is column in database table of this entity type. But it is not set as property.

When I don't use entity_metadata_wrapper, this code works for me:

&lt;?php
$transaction = commerce_payment_transaction_load(58);
$digests = array(
'DIGEST' =&gt; '456',
'DIGEST2' =&gt; '478'
);
$transaction-&gt;payload = $digests;
commerce_payment_transaction_save($transaction);
?&gt;


But is it possible to use also entity_metadata_wrapper to update data of entity, that are neither properties nor fields, like payload in commerce_payment_transaction?


Question: Would a monk with the tavern brawler feat have improvised weapons count as monk weapons?
Answer: 
  In many cases, an improvised weapon is similar to an actual weapon and can be treated as such. For example, a table leg is akin to a club. At the DM’s option, a character proficient with a weapon can use a similar object as if it were that weapon ...


This is the crux of the matter, If the weapon can be treated as a qualifying simple weapon, then the DM may allow it. Else you only escape the non-proficiency penalty.

At the end of the day everybody is playing by "House Rules"