Comments 3Nicholas started the conversationSeptember 1, 2023 at 12:52pmHi there,We need to prevent the copy_data action hook from running when a subaccount is created as this is overriding our custom subaccount shipping fields data.We have tried: remove_action('b2bking_after_subaccount_created', array($b2bking_public, 'b2bking_copy_data'), 10, 1);This is not working however.Please advise.NickAttached files: Screenshot 2023-09-01 at 13.52.06.png Screenshot 2023-09-01 at 13.51.58.png Screenshot 2023-09-01 at 13.51.52.png 2,218WebWizards repliedSeptember 2, 2023 at 12:09amHi Nick,I looked into this and you should be able to remove that by adding this PHP code snippet to your site: global $b2bking_plugin; remove_action('b2bking_after_subaccount_created', array($b2bking_plugin, 'b2bking_copy_data'), 10, 1); add_action('plugins_loaded', function(){ global $b2bking_plugin; remove_action('b2bking_after_subaccount_created', array($b2bking_plugin, 'b2bking_copy_data'), 10, 1); }); I've tested it on my local site and it is working in my tests,Kind regards,Stefan 3Nicholas repliedSeptember 18, 2023 at 1:24pmHi Stefan,This has done the trick, thank you for your help.Nick1 Like Sign in to reply ...
Hi there,
We need to prevent the copy_data action hook from running when a subaccount is created as this is overriding our custom subaccount shipping fields data.
We have tried:
This is not working however.
Please advise.
Nick
Attached files: Screenshot 2023-09-01 at 13.52.06.png
Screenshot 2023-09-01 at 13.51.58.png
Screenshot 2023-09-01 at 13.51.52.png
Hi Nick,
I looked into this and you should be able to remove that by adding this PHP code snippet to your site:
I've tested it on my local site and it is working in my tests,
Kind regards,
Stefan
Hi Stefan,
This has done the trick, thank you for your help.
Nick