Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
woocommerce_bpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
8
Issues
8
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wordpress
woocommerce_bpd
Commits
ba65712d
Commit
ba65712d
authored
Apr 05, 2014
by
Franco nextime Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make select case to work with the first option as default
parent
e3aaac5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
7 deletions
+1
-7
select.php
templates/addons/select.php
+1
-7
No files found.
templates/addons/select.php
View file @
ba65712d
...
...
@@ -6,12 +6,6 @@ $current_value = isset( $_POST['addon-' . sanitize_title( $addon['field-name'] )
<p
class=
"form-row form-row-wide addon-wrap-
<?php
echo
sanitize_title
(
$addon
[
'field-name'
]
);
?>
"
>
<select
class=
"addon addon-select"
name=
"addon-
<?php
echo
sanitize_title
(
$addon
[
'field-name'
]
);
?>
"
>
<?php
if
(
!
isset
(
$addon
[
'required'
]
)
)
:
?>
<option
value=
""
>
<?php
_e
(
'None'
,
'wc_product_addons'
);
?>
</option>
<?php
else
:
?>
<option
value=
""
>
<?php
_e
(
'Select an option...'
,
'wc_product_addons'
);
?>
</option>
<?php
endif
;
?>
<?php
foreach
(
$addon
[
'options'
]
as
$option
)
:
$loop
++
;
$price
=
$option
[
'price'
]
>
0
?
' ('
.
woocommerce_price
(
$option
[
'price'
]
)
.
')'
:
''
;
...
...
@@ -20,4 +14,4 @@ $current_value = isset( $_POST['addon-' . sanitize_title( $addon['field-name'] )
<?php
endforeach
;
?>
</select>
</p>
\ No newline at end of file
</p>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment