DUOSISTA
Forum Replies Created
-
Thank you, I’m sorry I could not get it working myself but appreciate the help and doing this update.
Sorry it changed my text. What I mean is should I be using the HTML character code for ”
Your original file has it as HTML character code;
`["unique_key"])
- This reply was modified 2 years, 2 months ago by DUOSISTA.
Still did not work;
if (isset($_cart_item_data["unique_key"]) || isset($_cart_item_data["bundled_by"]))
if (isset($_cart_item_data[“unique_key”]) || isset($_cart_item_data[“bundled_by”])) {
return $_cart_item_data;Could the issue be the ” marks? In your original code they are done as " but when I copy the code in the come in as “
[05-Sep-2022 01:08:00 UTC] PHP Parse error: syntax error, unexpected ‘if’ (T_IF), expecting function (T_FUNCTION) or const (T_CONST) in /home/XXXXXXXXX/public_html/wp-content/plugins/wc-fields-factory/includes/wcff_persister.php on line 41
[05-Sep-2022 06:11:31 UTC] PHP Parse error: syntax error, unexpected ‘&’, expecting ‘]’ in /home/XXXXXXXXX/public_html/wp-content/plugins/wc-fields-factory/includes/wcff_persister.php on line 43
For some strange reason each time I try this, it causes a critical issue on the website. Am I meant to add something in where it says “unique_key”?
I added this before line 41 but it caused a critical error. Should I be adding it like this??
if (isset($_cart_item_data["unique_key"]) || isset($_cart_item_data["bundled_by"])) { return $_cart_item_data; } public function persist($_cart_item_data, $_product_id, $_variation_id = null) { $this->pid = $_product_id; $this->cart_item_data = $_cart_item_data; /* Make sure it is an Array */ if (! is_array($this->cart_item_data)) { $this->cart_item_data = array(); }
I have got that correct?
Thanks for the help.
I’m using the WC Fields Factory. You can test the issue on the live website. When you purchase two of an item, the issues is evident. However doing the same process and choosing one, has the plugin working.