cancel
Showing results for 
Search instead for 
Did you mean: 

Remove custom shipping method

Remove custom shipping method

Hi,

How do I correctly remove my custom shipping method? See screenshot: http://prntscr.com/l15jin

I added a shipping method but it's only partly working, now I want to remove it's code and all functionality from Magento. If I only remove the custom code, the Magento shop crashes. 
The code is here: http://prntscr.com/l15kld
Do I need to disable or remove other things?

2 REPLIES 2

Re: Remove custom shipping method

Hello @Jojobaa

 

After removing module if site crash then it happen  if module contain catalog or customer attribute and that contain source model

 

So go to your module and find setup schema and upgrade schema

and check which attribute created, so you need to find attribute and need to remove from eav_attribute.

 

Let's example attribute name is custom_attribute then

query will be

 

delete from eav_attribute where attribute_code='custom_attribute '

 

after delete done, do reindex and cache flush.

 

If works then mark as solution.

 

 

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: Remove custom shipping method

Hi @Jojobaa

 

Looking at the first screenshot you have shared with us - if you select NO from the first option like Enabled - does your shipping method is not disabled ?

 

for the second point  - yes as suggested by @Sunil Patel - you need to remove its attribute and other values from the database.

 

Actually what happened when you installed any new extension on magento - in that extension they do have Setup Scripts (Like InstallSchema, UpgradeSchema etc) - so using that script extension will generates the new tables and also a new columns on existing tables as well.

 

So you can also try by disabling this extension like - run the command php bin/magento module:disable MagePlaza_ExtensionName

 

then run rest of the commands like setup:di:compile then setup:static-content:deploy -f  and cache clean and cache flush command.

 

It will works for you.

 

Hope it helps!

 

if issue solved,Click Kudos & Accept as Solution