Personal Woocommerce Subscription Customization
Budget: €8 – €30 EUR
I'm in need of an experienced developer who can customize my Woocommerce subscription setup for personal use.
Hi there,
We need to be able to add some custom fields in the admin part of the woocommerce subscriptions.
The custom code, which is required and added to our functions.php file in the child-theme is not working. Or at least the fields are not being displayed as shown on the picture.
We need to have 3 additional fields, those fields need to be displayed on the view-subscription page as well in the my account environment.
Project details:
1. Subscription Title
Field Type: Text (plain text)
Description: "Enter the title of this subscription here."
Developer Notes:
Meta Key: A unique identifier, e.g., '_subscription_title'.
Data Sanitization: Use sanitize_text_field to ensure the text is safely stored.
Data Validation: Ensure the input is a non-empty string.
Location: Add this field to a custom meta box on the WooCommerce Subscription edit page.
2. Project
Field Type: Text (plain text)
Description: "For which website is this intended?"
Developer Notes:
Meta Key: A unique identifier, e.g., '_subscription_project'.
Data Sanitization: Use sanitize_text_field for safe storage.
Data Validation: Confirm it's a valid string, possibly checking against a list of existing projects or URLs.
Location: Position this field below the 'Subscription Title' in the same meta box.
3. Subscription Information
Field Type: WYSIWYG (What You See Is What You Get) editor
Description: "Provide clear information here about what this subscription is for the customer."
Developer Notes:
Meta Key: Unique identifier, e.g., '_subscription_info'.
Data Sanitization: Use a function like wp_kses_post to ensure safe HTML storage.
Data Validation: No strict validation required as it's a rich text editor, but ensure HTML content is safely handled.
Height of Editor: Set to accommodate about 6 lines of text.
Location: This field should be the last in the custom meta box.
Additional Implementation Details:
Meta Box: Create a custom meta box, preferably in the sidebar of the WooCommerce Subscription edit page, to house these fields.
Saving Data: Hook into WooCommerce's save functionality to store these field values. Use the save_post action hook and verify nonce fields for security.
Display: Ensure these fields are displayed in both the admin panel (for editing) and on the customer's subscription view page (for informational purposes).
Security: Implement nonce verification for form submissions to prevent CSRF attacks.
Internationalization: Prepare strings such as field labels and descriptions for translation using WordPress's internationalization functions.
Testing & Validation:
Admin View: Test to ensure fields appear correctly in the admin panel and that saving updates the subscription meta correctly.
Frontend View: Verify that the 'Subscription Information' is appropriately rendered in the customer view, maintaining any formatting from the WYSIWYG editor.
Security: Test nonce functionality and form validations to prevent unauthorized submissions.
Also; we need to have a customization regarding order generation. When a order is set on manual, and the order is being generated and not being paid. The subscription is being placed on-hold. However, we would like to have the subscription remain active so that even though a order is not being paid, a new order is being generated. So that one subscription can have multiple outstanding orders.
Hi there,
We need to be able to add some custom fields in the admin part of the woocommerce subscriptions.
The custom code, which is required and added to our functions.php file in the child-theme is not working. Or at least the fields are not being displayed as shown on the picture.
We need to have 3 additional fields, those fields need to be displayed on the view-subscription page as well in the my account environment.
Project details:
1. Subscription Title
Field Type: Text (plain text)
Description: "Enter the title of this subscription here."
Developer Notes:
Meta Key: A unique identifier, e.g., '_subscription_title'.
Data Sanitization: Use sanitize_text_field to ensure the text is safely stored.
Data Validation: Ensure the input is a non-empty string.
Location: Add this field to a custom meta box on the WooCommerce Subscription edit page.
2. Project
Field Type: Text (plain text)
Description: "For which website is this intended?"
Developer Notes:
Meta Key: A unique identifier, e.g., '_subscription_project'.
Data Sanitization: Use sanitize_text_field for safe storage.
Data Validation: Confirm it's a valid string, possibly checking against a list of existing projects or URLs.
Location: Position this field below the 'Subscription Title' in the same meta box.
3. Subscription Information
Field Type: WYSIWYG (What You See Is What You Get) editor
Description: "Provide clear information here about what this subscription is for the customer."
Developer Notes:
Meta Key: Unique identifier, e.g., '_subscription_info'.
Data Sanitization: Use a function like wp_kses_post to ensure safe HTML storage.
Data Validation: No strict validation required as it's a rich text editor, but ensure HTML content is safely handled.
Height of Editor: Set to accommodate about 6 lines of text.
Location: This field should be the last in the custom meta box.
Additional Implementation Details:
Meta Box: Create a custom meta box, preferably in the sidebar of the WooCommerce Subscription edit page, to house these fields.
Saving Data: Hook into WooCommerce's save functionality to store these field values. Use the save_post action hook and verify nonce fields for security.
Display: Ensure these fields are displayed in both the admin panel (for editing) and on the customer's subscription view page (for informational purposes).
Security: Implement nonce verification for form submissions to prevent CSRF attacks.
Internationalization: Prepare strings such as field labels and descriptions for translation using WordPress's internationalization functions.
Testing & Validation:
Admin View: Test to ensure fields appear correctly in the admin panel and that saving updates the subscription meta correctly.
Frontend View: Verify that the 'Subscription Information' is appropriately rendered in the customer view, maintaining any formatting from the WYSIWYG editor.
Security: Test nonce functionality and form validations to prevent unauthorized submissions.
Also; we need to have a customization regarding order generation. When a order is set on manual, and the order is being generated and not being paid. The subscription is being placed on-hold. However, we would like to have the subscription remain active so that even though a order is not being paid, a new order is being generated. So that one subscription can have multiple outstanding orders.