Closed. This question is off-topic. It is not currently accepting answers.admin管理员组文章数量:1130349
Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 6 years ago.
Improve this questionI have a plugin that adds additional shipping method with some intricate logic to it that adds specific checkout fields with API-generated values etc.
The thing is that I need variation of this shipping method (like free delivery in certain conditions certain amount etc).
Is it possible to somehow create a class that inherits this custom shipping method with all its intricate logic or do it otherwise without having to clone the entire plugin folder and adjusting plugin name etc?
Closed. This question is off-topic. It is not currently accepting answers.Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 6 years ago.
Improve this questionI have a plugin that adds additional shipping method with some intricate logic to it that adds specific checkout fields with API-generated values etc.
The thing is that I need variation of this shipping method (like free delivery in certain conditions certain amount etc).
Is it possible to somehow create a class that inherits this custom shipping method with all its intricate logic or do it otherwise without having to clone the entire plugin folder and adjusting plugin name etc?
Share Improve this question asked Dec 14, 2018 at 14:59 user2361user2361 1012 bronze badges1 Answer
Reset to default 1I see 2 options here:
- Create a new plugin (copying the old one) and modify it as you need
- With just one plugin, create multiple shipping methods. Remember that you can call the
add_rate()method multiple times inside one shipping class.
As a shipping plugins developer, what I do is using the second option for each variant of a carrier. For example if we are using DHL, with one plugin and within the same class, you can add shipping options for DHL Express shipping and DHL Standard shipping. You don't need multiple classes for this.
Closed. This question is off-topic. It is not currently accepting answers.Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 6 years ago.
Improve this questionI have a plugin that adds additional shipping method with some intricate logic to it that adds specific checkout fields with API-generated values etc.
The thing is that I need variation of this shipping method (like free delivery in certain conditions certain amount etc).
Is it possible to somehow create a class that inherits this custom shipping method with all its intricate logic or do it otherwise without having to clone the entire plugin folder and adjusting plugin name etc?
Closed. This question is off-topic. It is not currently accepting answers.Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 6 years ago.
Improve this questionI have a plugin that adds additional shipping method with some intricate logic to it that adds specific checkout fields with API-generated values etc.
The thing is that I need variation of this shipping method (like free delivery in certain conditions certain amount etc).
Is it possible to somehow create a class that inherits this custom shipping method with all its intricate logic or do it otherwise without having to clone the entire plugin folder and adjusting plugin name etc?
Share Improve this question asked Dec 14, 2018 at 14:59 user2361user2361 1012 bronze badges1 Answer
Reset to default 1I see 2 options here:
- Create a new plugin (copying the old one) and modify it as you need
- With just one plugin, create multiple shipping methods. Remember that you can call the
add_rate()method multiple times inside one shipping class.
As a shipping plugins developer, what I do is using the second option for each variant of a carrier. For example if we are using DHL, with one plugin and within the same class, you can add shipping options for DHL Express shipping and DHL Standard shipping. You don't need multiple classes for this.
本文标签: plugin developmentDuplicate shipping method logic to another shipping method
版权声明:本文标题:plugin development - Duplicate shipping method logic to another shipping method 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749098952a2315697.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论