Skip to content

Instantly share code, notes, and snippets.

@xlplugins
Created April 24, 2024 10:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xlplugins/8113de388a4983cd00b7789c4f676523 to your computer and use it in GitHub Desktop.
Save xlplugins/8113de388a4983cd00b7789c4f676523 to your computer and use it in GitHub Desktop.
alter product attributes
add_filter( 'wfacp_product_attributes', function ( $attributes ,$product_obj, $product_id) {
if($product_id!==252753){
return $attributes;
}
if ( isset( $attributes['attribute_razmer'] ) ) {
$attributes['attribute_%d1%80%d0%b0%d0%b7%d0%bc%d0%b5%d1%80'] = $attributes['attribute_razmer'];
unset( $attributes['attribute_razmer'] );
}
return $attributes;
}, 10,3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment