Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wp-settings-field-sender-address
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wpdesk
wp-settings-field-sender-address
Commits
5b668c8c
Commit
5b668c8c
authored
5 years ago
by
Grzegorz Rola
Browse files
Options
Downloads
Patches
Plain Diff
Init
parent
a196a392
No related branches found
Tags
Tags containing commit
1 merge request
!1
Init
Pipeline
#2425
failed
5 years ago
Stage: prepare
Stage: tools
Stage: tests
Stage: pre-deploy
Stage: deploy
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/SettingsField.php
+2
-0
2 additions, 0 deletions
src/SettingsField.php
src/ShippingMethodRenderSettingsTrait.php
+27
-0
27 additions, 0 deletions
src/ShippingMethodRenderSettingsTrait.php
with
29 additions
and
0 deletions
src/SettingsField.php
+
2
−
0
View file @
5b668c8c
...
...
@@ -11,6 +11,8 @@ namespace WpDesk\WooCommerce\ShippingMethod\Fields\SenderAddress;
*/
class
SettingsField
{
const
FIELD_TYPE
=
'sender_address'
;
/**
* Field name.
*
...
...
This diff is collapsed.
Click to expand it.
src/ShippingMethodRenderSettingsTrait.php
0 → 100644
+
27
−
0
View file @
5b668c8c
<?php
/**
* Render settings HTML.
*
* @package WpDesk\WooCommerce\ShippingMethod\Fields\SenderAddress
*/
namespace
WpDesk\WooCommerce\ShippingMethod\Fields\SenderAddress
;
/**
* Can render settings html.
*/
trait
ShippingMethodRenderSettingsTrait
{
/**
* Generates settings HTML.
*
* @param string $key .
* @param array $data .
*/
public
function
generate_sender_address_html
(
$key
,
$data
)
{
$settings_field
=
new
SettingsField
(
$key
);
$settings_field
->
render
(
$data
[
'title'
],
''
,
$data
[
'value'
],
null
);
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment