This doc is using Angular 6 with Angular CLI.
- Make sure to import FormsModule
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
...
@NgModule({
imports: [
/** | |
* Register new status refuz & verificare | |
**/ | |
function register_new_orders_status() { | |
register_post_status( 'wc-refuz', array( | |
'label' => 'Refuz comanda', | |
'public' => true, | |
'exclude_from_search' => false, | |
'show_in_admin_all_list' => true, | |
'show_in_admin_status_list' => true, |
$filters = array( | |
'post_status' => 'any', | |
'post_type' => 'shop_order', | |
'posts_per_page' => 200, | |
'paged' => 1, | |
'orderby' => 'modified', | |
'order' => 'ASC' | |
); | |
$loop = new WP_Query($filters); |
add_action('woocommerce_order_status_changed', 'send_custom_email_notifications', 10, 4 ); | |
function send_custom_email_notifications( $order_id, $old_status, $new_status, $order ){ | |
if ( $new_status == 'cancelled' || $new_status == 'failed' ){ | |
$wc_emails = WC()->mailer()->get_emails(); // Get all WC_emails objects instances | |
$customer_email = $order->get_billing_email(); // The customer email | |
} | |
if ( $new_status == 'cancelled' ) { | |
// change the recipient of this instance | |
$wc_emails['WC_Email_Cancelled_Order']->recipient = $customer_email; |
// Show or hide content based on whether user is logged in or not | |
// shortcode for logged in users is [loggedin]content[/loggedin] | |
// shortcode for logged out users us [loggedout]content[/loggedout] | |
function loggedincheck( $atts, $content = null ) { | |
$user = wp_get_current_user(); | |
$allowed_roles = array('administrator', 'editor', 'author'); | |
if ( is_user_logged_in() && !is_null( $content ) && !is_feed() && array_intersect($allowed_roles, $user->roles ) ) { | |
return $content; | |
return ''; |
/* | |
Base.js, version 1.1a | |
Copyright 2006-2010, Dean Edwards | |
License: http://www.opensource.org/licenses/mit-license.php | |
*/ | |
var Base = function() { | |
// dummy | |
}; |
[ | |
{"id":"2","country_id":"1","region1":"Bucure\u015fti - Ilfov","region2":"Bucure\u015fti","region3":"Sectorul 1","region4":null,"name":"Bucure\u015fti","region1_latin":"Bucuresti - Ilfov","region2_latin":"Bucuresti","region3_latin":"Sectorul 1","region4_latin":null,"name_latin":"Bucuresti","geoid":"1","iso2":"RO-B","lat":"44.436550","lng":"26.099350","zip":"10011","timezone":"Europe\/Bucharest","utc":"UTC+2","dst":"Y","status":"1","created":"2014-01-08 15:25:14","modified":"2016-09-22 08:10:38"}, | |
{"id":"3","country_id":"1","region1":"Bucure\u015fti - Ilfov","region2":"Bucure\u015fti","region3":"Sectorul 2","region4":null,"name":"Bucure\u015fti","region1_latin":"Bucuresti - Ilfov","region2_latin":"Bucuresti","region3_latin":"Sectorul 2","region4_latin":null,"name_latin":"Bucuresti","geoid":"3115","iso2":"RO-B","lat":"44.450470","lng":"26.123220","zip":"20122","timezone":"Europe\/Bucharest","utc":"UTC+2","dst":"Y","status":"1","created":"2014-01-08 15:25:14","modified":"2016-09-22 08:10:38"}, | |
{"id":"4","countr |
[ | |
{"id":"2","country_id":"1","region1":"Bucure\u015fti - Ilfov","region2":"Bucure\u015fti","region3":"Sectorul 1","region4":null,"name":"Bucure\u015fti","region1_latin":"Bucuresti - Ilfov","region2_latin":"Bucuresti","region3_latin":"Sectorul 1","region4_latin":null,"name_latin":"Bucuresti","geoid":"1","iso2":"RO-B","lat":"44.436550","lng":"26.099350","zip":"10011","timezone":"Europe\/Bucharest","utc":"UTC+2","dst":"Y","status":"1","created":"2014-01-08 15:25:14","modified":"2016-09-22 08:10:38"}, | |
{"id":"3","country_id":"1","region1":"Bucure\u015fti - Ilfov","region2":"Bucure\u015fti","region3":"Sectorul 2","region4":null,"name":"Bucure\u015fti","region1_latin":"Bucuresti - Ilfov","region2_latin":"Bucuresti","region3_latin":"Sectorul 2","region4_latin":null,"name_latin":"Bucuresti","geoid":"3115","iso2":"RO-B","lat":"44.450470","lng":"26.123220","zip":"20122","timezone":"Europe\/Bucharest","utc":"UTC+2","dst":"Y","status":"1","created":"2014-01-08 15:25:14","modified":"2016-09-22 08:10:38"}, | |
{"id":"4","countr |
[{ "name": "JavaScript", "year": "2012", "quarter": "2", "count": "29168" }, | |
{ "name": "Ruby", "year": "2012", "quarter": "2", "count": "21053" }, | |
{ "name": "Python", "year": "2012", "quarter": "2", "count": "20940" }, | |
{ "name": "PHP", "year": "2012", "quarter": "2", "count": "13371" }, | |
{ "name": "Java", "year": "2012", "quarter": "2", "count": "12817" }, | |
{ "name": "C++", "year": "2012", "quarter": "2", "count": "10648" }, | |
{ "name": "C", "year": "2012", "quarter": "2", "count": "5324" }, | |
{ "name": "Objective-C", "year": "2012", "quarter": "2", "count": "3228" }, | |
{ "name": "C#", "year": "2012", "quarter": "2", "count": "3216" }, | |
{ "name": "XSLT", "year": "2012", "quarter": "2", "count": "1828" }, |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
window.onload = function() { |