How to create form for uploading external/affiliate type WooCommerce product

The process for creating a form to upload external/affiliate type product given here.

1) Add a hidden type field with meta key & value to your product form. The meta value should be external.

Refer Screenshot:
http://prntscr.com/egkcws

2) Add an URL & a text type custom field, insert _product_url & _button_text meta key for them respectively.

Refer Screenshot:
http://prntscr.com/egkdox

3) Add the following code inside the theme’s functions.php file.

Note: This is a Developer level doc. If you are unfamiliar with code/templates and resolving potential conflicts, contact me for assistance.

GeSHi Error: GeSHi could not find the language php (using path /home/mahbktbn/public_html/wp-content/plugins/codecolorer/lib/geshi/) (code 2)

Now, check the form on the frontend, try to upload a product & check the submitted product type in wp-admin. The product type should be external/affiliate.

Reference Video:
https://www.youtube.com/watch?v=i2NDYqlAqjo

By Mahbubur Rahman

Self Taught Programmer And Learning Enthusiast

1 comment

Leave a comment

Your email address will not be published. Required fields are marked *