add_filter( 'woocommerce_states', 'custom_woocommerce_states' );
function custom_woocommerce_states( $states ) {
$states['MY'] = array(
'PJY' => 'Putrajaya'
);
return $states;
}
//add this at child theme function.php
All muhaza's note in developing website. Front-end & uiux method. Real life implementation for webdesigner.
Tuesday, 28 April 2020
Wednesday, 15 April 2020
AXIOS CHEAT SHEET
GET request
// Make a request for a user with a given ID axios.get('/user?ID=12345') .then(function (response) { console.log(response); }) .catch(function (error) { console.log(error); }); // Optionally the request above could also be done as axios.get('/user', { params: { ID: 12345 } }) .then(function (response) { console.log(response); }) .catch(function (error) { console.log(error); }); | |
POST request
axios.post('/user', { firstName: 'Fred', lastName: 'Flintstone' }) .then(function (response) { console.log(response); }) .catch(function (error) { console.log(error); }); | |
Multiple concurrent requests
function getUserAccount() { return axios.get('/user/12345'); } function getUserPermissions() { return axios.get('/user/12345/permissions'); } axios.all([getUserAccount(), getUserPermissions()]) .then(axios.spread(function (acct, perms) { // Both requests are now complete })); | |
POST request config
// Send a POST request axios({ method: 'post', url: '/user/12345', data: { firstName: 'Fred', lastName: 'Flintstone' } }); | |
GET request config
// GET request for remote image axios({ method: 'get', url: 'http://bit.ly/2mTM3nY', responseType: 'stream' }) .then(function(response) { response.data.pipe(fs.createWriteStream('ada_lovelace.jpg')) }); | |
Create instance
var instance = axios.create({ baseURL: 'https://some-domain.com/api/', timeout: 1000, headers: {'X-Custom-Header': 'foobar'} }); |
Monday, 6 April 2020
Javascript Concepts Functions Related
- Global Scope
- Local Scope
var greeting='Welcome to blog';
(function(){
console.log(greeting); //Output: Welcome to blog
})();
consider above code greeting variable should be global scope, it can access inside the function,
(function(){var greeting = 'Welcome to blog'; console.log(greeting); //Output: Welcome to blog })();console.log(greeting); //Output:Reference-Error greeting not defined
Subscribe to:
Posts (Atom)
Auto select after redirect to the contact page SELECT JAVASCRIPT
https://domain.my/contact/?startup_package=UltimateImpact <select name="startup_package" class="form-select"...
-
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 < div style = "background-color:#D94A38;width:170px;height:80px;ma...