Skip to content

Commit 100a668

Browse files
committed
add demo/dem login for demo sites
1 parent 7c59068 commit 100a668

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

templates/auth.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,26 @@
7171
</div>
7272

7373
<div class="clear"></div>
74+
75+
<script type="text/javascript">
76+
(function() {
77+
// Check if we're on demo domains and auto-populate credentials
78+
var hostname = window.location.hostname;
79+
var isDemoDomain = hostname === 'demo.wcpos.com' || hostname === 'wcposdev.wpengine.com';
80+
81+
if (isDemoDomain) {
82+
// Wait for DOM to be ready
83+
document.addEventListener('DOMContentLoaded', function() {
84+
var usernameField = document.getElementById('wcpos-user-login');
85+
var passwordField = document.getElementById('wcpos-user-pass');
86+
87+
if (usernameField && passwordField) {
88+
usernameField.value = 'demo';
89+
passwordField.value = 'demo';
90+
}
91+
});
92+
}
93+
})();
94+
</script>
7495
</body>
7596
</html>

0 commit comments

Comments
 (0)