I have no idea what I’m doing. You mean something like this?
function custom_unserialize($string){
try {
$reformatted = unserialize($string);
} catch (\Exception $e) {
return false;
}
return $reformatted;
}
add_filter( 'acf/load_value/name=_catcbll_btn_label', 'custom_unserialize', 10 );
See Screenshot of the field form I added with ACF for the field _catcbll_btn_label
. It’s a plugin-specific field, but I added it as a custom field entry in the ACF plugin, so that I would have an form field to enter data in the product screen.
In the product post screen, I need to save this value a:1:{i:0;s:22:"Request Shipping Quote";}
in the custom field _catcbll_btn_label
to cause a plugin known as Custom Add to Cart Button Label and Link to display a shipping quote button. Yet the ACF or WP is not handling it correctly, as the _catcbll_btn_label
field shows [""]
when I refresh the product page after submitting the value a:1:{i:0;s:22:"Request Shipping Quote";}
. Can you suggest anything helpful?
John Huebner,
Could you please provide the code that was your solution?