Skip to content

Instantly share code, notes, and snippets.

@bentasm1
Forked from digitalchild/product-edit.php
Created October 28, 2015 21:42
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 bentasm1/41c82f2e41d3c78d5efd to your computer and use it in GitHub Desktop.
Save bentasm1/41c82f2e41d3c78d5efd to your computer and use it in GitHub Desktop.
WC Vendors Pro - Replace product descriptions with wordpress editor
<?php
// This code goes in the product-edit.php override template for wc-vendors pro
// Replace WCVendors_Pro_Product_Form::description( $object_id, $product_description );
// with
$product_description_args = array(
'editor_height' => 200,
'media_buttons' => true,
'teeny' => true,
);
wp_editor( $product_description , 'post_content', $product_description_args );
// Replace WCVendors_Pro_Product_Form::short_description( $object_id, $product_short_description );
// With
$product_short_description_args = array(
'editor_height' => 200,
'media_buttons' => true,
'teeny' => true,
);
wp_editor( product_short_description , 'post_excerpt', $product_short_description_args );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment