11
11
use Rnoc \Retainful \Api \AbandonedCart \RestApi ;
12
12
use Rnoc \Retainful \Api \Imports \Imports ;
13
13
use Rnoc \Retainful \Api \Imports \Products ;
14
- use Rnoc \Retainful \Api \Imports \Category ;
14
+ // use Rnoc\Retainful\Api\Imports\Category;
15
15
use Rnoc \Retainful \Api \NextOrderCoupon \CouponManagement ;
16
16
use Rnoc \Retainful \Api \Popup \Popup ;
17
17
use Rnoc \Retainful \Integrations \AfterPay ;
@@ -109,16 +109,16 @@ function registerSyncEndPoints() {
109
109
'permission_callback ' => '__return_true ' ,
110
110
'callback ' => array ($ product , 'getSyncProductCount ' )
111
111
));
112
- register_rest_route ('retainful-api/v1 ' , '/category/count ' , array (
113
- 'methods ' => 'GET ' ,
114
- 'permission_callback ' => '__return_true ' ,
115
- 'callback ' => array (Category::class, 'getCategoryCount ' )
116
- ));
117
- register_rest_route ('retainful-api/v1 ' , '/category ' , array (
118
- 'methods ' => 'GET ' ,
119
- 'permission_callback ' => '__return_true ' ,
120
- 'callback ' => array (Category::class, 'getCategory ' )
121
- ));
112
+ // register_rest_route('retainful-api/v1', '/category/count', array(
113
+ // 'methods' => 'GET',
114
+ // 'permission_callback' => '__return_true',
115
+ // 'callback' => array(Category::class, 'getCategoryCount')
116
+ // ));
117
+ // register_rest_route('retainful-api/v1', '/category', array(
118
+ // 'methods' => 'GET',
119
+ // 'permission_callback' => '__return_true',
120
+ // 'callback' => array(Category::class, 'getCategory')
121
+ // ));
122
122
123
123
}
124
124
@@ -377,10 +377,10 @@ function activateEvents() {
377
377
), 50 , 2 );
378
378
$ product = new Products ();
379
379
380
- add_filter ( 'woocommerce_valid_webhook_resources ' ,function ($ resources ){
381
- $ resources [] = 'category ' ;
382
- return $ resources ;
383
- });
380
+ // add_filter( 'woocommerce_valid_webhook_resources',function($resources){
381
+ // $resources[] = 'category';
382
+ // return $resources;
383
+ // });
384
384
385
385
//add_action('woocommerce_update_order', array($checkout, 'orderUpdated'), 10, 1);
386
386
add_filter ( 'woocommerce_webhook_http_args ' ,function ( $ http_args , $ order_id , $ webhook_id ) use ($ product ,$ checkout ){
@@ -390,9 +390,10 @@ function activateEvents() {
390
390
try {
391
391
$ webhook = new \WC_Webhook ( $ webhook_id );
392
392
$ topic = $ webhook ->get_topic ();
393
- if (preg_match ("/category/i " , $ topic )) {
394
- $ http_args = Category::changeWebHookHeaderCategory ( $ http_args , $ order_id , $ webhook_id );
395
- }elseif (preg_match ("/order/i " , $ topic )){
393
+ // if(preg_match("/category/i", $topic)) {
394
+ // $http_args = Category::changeWebHookHeaderCategory( $http_args, $order_id, $webhook_id);
395
+ // }else
396
+ if (preg_match ("/order/i " , $ topic )){
396
397
$ http_args = $ checkout ->changeWebHookHeader ( $ http_args , $ order_id , $ webhook_id );
397
398
}elseif (preg_match ("/product/i " , $ topic )){
398
399
$ http_args = $ product ->changeWebHookHeaderProduct ( $ http_args , $ order_id , $ webhook_id );
@@ -405,10 +406,10 @@ function activateEvents() {
405
406
406
407
407
408
408
- add_action ('created_product_cat ' , [Category::class,'createCategory ' ], 10 , 2 );
409
- add_action ('edited_product_cat ' , [Category::class,'updateCategory ' ], 10 , 2 );
410
- add_action ('delete_product_cat ' , [Category::class,'deleteCategory ' ], 10 , 2 );
411
- add_action ('retainful_category ' , [Category::class, 'categoryCallback ' ], 10 , 2 );
409
+ // add_action('created_product_cat', [Category::class,'createCategory'], 10, 2);
410
+ // add_action('edited_product_cat', [Category::class,'updateCategory'], 10, 2);
411
+ // add_action('delete_product_cat', [Category::class,'deleteCategory'], 10, 2);
412
+ // add_action('retainful_category', [Category::class, 'categoryCallback'], 10, 2);
412
413
413
414
//Todo: multi currency and multi lingual
414
415
//add_action('wp_login', array($this->abandoned_cart_api, 'userCartUpdated'));
0 commit comments