// http://stackoverflow.com/questions/26581467/creating-woocommerce-order-with-line-item-programatically
$address = array(
'first_name' => 'Fresher',
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @param WP_Query|null $wp_query | |
* @param bool $echo | |
* @param array $params | |
* | |
* @return string|null | |
* | |
* UPDATE for Bootstrap 5.0: https://gist.github.com/mtx-z/af85d3abd4c19a84a9713e69956e1507 | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//======================================================================================================= | |
// Create new webhook in your Discord channel settings and copy&paste URL | |
//======================================================================================================= | |
$webhookurl = "YOUR_WEBHOOK_URL"; | |
//======================================================================================================= | |
// Compose message. You can use Markdown | |
// Message Formatting -- https://discordapp.com/developers/docs/reference#message-formatting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fetch(ajax_url, { | |
method: 'POST', | |
credentials: 'same-origin', | |
headers: new Headers({'Content-Type': 'application/x-www-form-urlencoded'}), | |
body: 'action=zget_profile_user' | |
}) | |
.then((resp) => resp.json()) | |
.then(function(data) { | |
if(data.status == "success"){ | |
_this.setState({loaded:true,user:data.user}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Password reset on sub site (1 of 4) | |
* Replace login page "Lost Password?" urls. | |
* | |
* @param string $lostpassword_url The URL for retrieving a lost password. | |
* @param string $redirect The path to redirect to. | |
* | |
* @return string | |
* | |
* @since 1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Creating tables in Single site installations | |
function on_activate() { | |
create_table(); | |
} | |
function create_table() { | |
global $wpdb; | |
$table_name = $wpdb->prefix . 'table_name'; |