Home Forums WoodMart support forum WOODMART_Registry

WOODMART_Registry

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #569141

    raulis
    Participant

    Hey,

    I am getting this error in my custom code. Did this class got depricated? what should I use instead?

    Thank you.

    #569221

    Artem Temos
    Keymaster

    Hello,

    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

    #569421

    raulis
    Participant

    Thank you, what name should be used instead?

    #569422

    raulis
    Participant

    Adding some code

    #569519

    Artem Temos
    Keymaster

    You can use namespace XTS, so it will be like XTS\Registry. But we don’t have a complete code snippet for this and such customizations are out of our theme support scope.

    #569532

    raulis
    Participant

    Can you point me to what wrong I am doing here.?

    #569629

    Artem Temos
    Keymaster

    Hello,

    You can use our special function instead woodmart_get_opt('option_name')

    #569695

    raulis
    Participant

    I 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.

    #569697

    raulis
    Participant

    I also have tryed to edit the name by your suggestion, but that just creates new error.

    #569703

    raulis
    Participant

    After this adjustments I am getting null instance on get_opt() method.

    #569756

    Artem Temos
    Keymaster

    Sorry, 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

    #569787

    raulis
    Participant

    It is very basic tho, I am just asking how to rename the class that you changed, as nothing helps and makes sense for me.

    #569792

    Artem Temos
    Keymaster

    We 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.

    #569800

    raulis
    Participant

    I wrote excatly as you said:XTS\Registry instead of WOODMART_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.

    #570095

    Artem Temos
    Keymaster

    Yes, there is no options in our registry anymore. It is moved to a separate module and you can find it in woodmart/inc/admin/modules/options.

Viewing 15 posts - 1 through 15 (of 15 total)