WordPress REST API Custom Endpoint with URL Parameter

First you need to pass in the namespace to register_rest_route Like this add_action( ‘rest_api_init’, function () { register_rest_route( ‘namespace/v1’, ‘/product/(?P<id>d+)’, array( ‘methods’ => ‘GET’, ‘callback’ => ‘my_awesome_func’, )

Read More »

Programmatically creating new order in Woocommerce

Programmatically creating new order in Woocommerce function create_vip_order() { global $woocommerce; $address = array( ‘first_name’ => ‘111Joe’, ‘last_name’ => ‘Conlin’, ‘company’ => ‘Speed Society’, ’email’

Read More »

Register

Create your account and post ad