Tagged: woocommerce
-
AuthorPosts
-
December 21, 2023 at 3:10 am #1428635
Hello,
Since the latest Enfold update was installed, I noticed I am getting a “duplicate” post link when I roll over an order link in WooCommerce. I spoke to Woo Support and they said it is from the parent theme since the CSS on the button says Avia Framework. Is there a simple solution to fix this?
Thanks,
MoniqueDecember 21, 2023 at 10:52 am #1428652Hey Monique,
Thank you for the inquiry.
Please temporarily edit the enfold/config-templatebuilder/avia-template-builder/php/class-element-templates.php and remove this code around line 672.
$duplicate = '<a href="' . $notify_url . '" aria-label="' . esc_attr__( 'Make a duplicate from this element template', 'avia_framework' ) . '" rel="permalink">'; $duplicate .= esc_html__( 'Duplicate', 'avia_framework' ); $duplicate .= '</a>'; $actions['duplicate'] = $duplicate;
Let us know if this removes the Duplicate button.
Best regards,
IsmaelDecember 28, 2023 at 3:11 am #1428934Thanks. I removed the code but it did not make a difference. I am still seeing the duplicate link on the orders.
I also see this code that was above the other code:
$notify_url = wp_nonce_url( admin_url( ‘edit.php?post_type=’ . $this->get_post_type() . ‘&action=duplicate_element_template&post=’ . $post->ID ), ‘avia-duplicate-element-template_’ . $post->ID );
I was not sure if I should remove that.
December 28, 2023 at 9:01 am #1428939Hi,
I cannot see the “Duplicate” link on Orders on my local installation. Please send us temporary admin login credentials to your staging site so we can look into it.
Regards,
YigitJanuary 1, 2024 at 9:55 pm #1429091Please see private content for test site credentials. Thanks.
January 1, 2024 at 10:42 pm #1429092Hey Monique,
Login credentials didn’t work for me. Please check them once again.
Regards,
YigitJanuary 3, 2024 at 2:51 am #1429158This one should work.
January 3, 2024 at 10:43 pm #1429216Hi,
Thank you, this one worked.
Please add the following code to the functions.php file of your child theme in the Appearance > Theme File Editor:
add_filter('avf_ignore_duplicate_post_types', 'enfold_disable_duplicate_link'); function enfold_disable_duplicate_link($args){ $post_types = ['shop_order']; return $post_types; }
Best regards,
YigitJanuary 4, 2024 at 3:22 am #1429233Thanks Yigit. It is working correctly now.
January 4, 2024 at 6:19 am #1429235 -
AuthorPosts
- The topic ‘Duplicate link in WooCommerce Orders’ is closed to new replies.