Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Get external product through WPUF WC form.
- * Add this code in your wp-content/themes/child-theme/functions.php file
- **/
- function wpuf_support_external_product( $post_id ) {
- $product_type = get_post_meta( $post_id, 'product_type', true );
- wp_set_object_terms( $post_id, $product_type, 'product_type' );
- }
- add_action( 'wpuf_add_post_after_insert', 'wpuf_support_external_product' );
- add_action( 'wpuf_edit_post_after_update', 'wpuf_support_external_product' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement