Home › Forums › WoodMart support forum › WOODMART_Registry
WOODMART_Registry
- This topic has 14 replies, 2 voices, and was last updated 6 months, 2 weeks ago by Artem Temos.
-
AuthorPosts
-
May 29, 2024 at 8:01 pm #569141
raulisParticipantHey,
I am getting this error in my custom code. Did this class got depricated? what should I use instead?
Thank you.
May 30, 2024 at 9:29 am #569221
Artem TemosKeymasterHello,
This class was refactored and renamed. You can see its source code in the file
wp-content/themes/woodmart/inc/classes/class-registry.php
.Kind Regards
May 30, 2024 at 1:35 pm #569421
raulisParticipantThank you, what name should be used instead?
May 30, 2024 at 1:35 pm #569422
raulisParticipantAdding some code
May 30, 2024 at 4:54 pm #569519
Artem TemosKeymasterYou can use namespace
XTS,
so it will be likeXTS\Registry.
But we don’t have a complete code snippet for this and such customizations are out of our theme support scope.May 30, 2024 at 5:07 pm #569532
raulisParticipantCan you point me to what wrong I am doing here.?
May 31, 2024 at 9:15 am #569629
Artem TemosKeymasterHello,
You can use our special function instead
woodmart_get_opt('option_name')
May 31, 2024 at 11:51 am #569695
raulisParticipantI dont understand. I am trying to edit this funkction, so I can’t use it inside this code. Here is full code and I am looking to understand to what I need to change ‘WOODMART_Registry’ in order for this function to work.
Thank you for the help.
May 31, 2024 at 12:00 pm #569697
raulisParticipantI also have tryed to edit the name by your suggestion, but that just creates new error.
May 31, 2024 at 12:31 pm #569703
raulisParticipantAfter this adjustments I am getting null instance on get_opt() method.
May 31, 2024 at 2:14 pm #569756
Artem TemosKeymasterSorry, but we don’t know what exactly is wrong with your custom code. Additional code customizations like that are out of our theme support scope.
Kind Regards
May 31, 2024 at 3:30 pm #569787
raulisParticipantIt is very basic tho, I am just asking how to rename the class that you changed, as nothing helps and makes sense for me.
May 31, 2024 at 3:34 pm #569792
Artem TemosKeymasterWe wrote how to rename the class in our reply,
#569519
, but it looks like you are still using it incorrectly. You don’t need to call this class at all, but we don’t know why you are trying to achieve this and don’t have a working solution.May 31, 2024 at 3:49 pm #569800
raulisParticipantI wrote excatly as you said:
XTS\Registry
instead ofWOODMART_Registry
The issue is that this part is empty
options->
and returns null for some reason.I have no Idea how this code works, just after update it stopped working. Essencia what it does is creates a widget earia in single produc pages with certain categorys. I can send you link to working example if that would help to understand.
Anyway, I know that is is nothing you want to help with, but if you would I do appriciate it.
June 3, 2024 at 9:18 am #570095
Artem TemosKeymasterYes, there is no
options
in our registry anymore. It is moved to a separate module and you can find it inwoodmart/inc/admin/modules/options
. -
AuthorPosts
- You must be logged in to create new topics. Login / Register