Skip to content

Instantly share code, notes, and snippets.

@geesen
geesen / class-wc-api-products.php
Created August 20, 2015 14:17
woocommerce create product categories via RST Api
//....
public function register_routes( $routes ) {
//....
# GET/POST /products/categories
$routes[ $this->base . '/categories' ] = array(
array( array( $this, 'get_product_categories' ), WC_API_Server::READABLE ),
array( array( $this, 'create_product_categories' ), WC_API_SERVER::CREATABLE | WC_API_Server::ACCEPT_DATA ),
);
# GET/PUT/DELETE /products/categories/<id>
@geesen
geesen / SecurityConfiguration
Created July 8, 2015 09:19
Example of SecurityConfiguration for Spring (JHipster) and LDAP
package de.indivon.example.config;
import java.util.ArrayList;
import java.util.Collection;
import javax.inject.Inject;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;