| @@ -120,11 +120,16 @@ | ||
| 120 | 120 | * @param int $site_id Site ID. |
| 121 | 121 | * @return array License arguments. |
| 122 | 122 | */ |
| 123 | 123 | public static function get_flow( $site_id ) { |
| 124 | - $request_params = array( | |
| 125 | - 'licence_args' => self::get_licence_args(), | |
| 126 | - '_fields' => 'id,slug,status,type,link,title,featured_media,template,cartflows_flow_page_builder,cartflows_flow_type,cartflows_flow_flow,featured_image_url,licence_status,flow_type,flow_type,page_builder,divi_content,post_meta,content,flow_gcp_meta', | |
| 124 | + $request_params = apply_filters( | |
| 125 | + 'cartflows_get_flow_params', | |
| 126 | + array( | |
| 127 | + 'licence_args' => self::get_licence_args(), | |
| 128 | + '_fields' => 'id,slug,status,type,link,title,featured_media,template,cartflows_flow_page_builder,cartflows_flow_type,cartflows_flow_flow,featured_image_url,licence_status,flow_type,flow_type,page_builder,divi_content,post_meta,content,flow_gcp_meta', | |
| 129 | + 'url' => site_url(), | |
| 130 | + 'version' => CARTFLOWS_VER, | |
| 131 | + ) | |
| 127 | 132 | ); |
| 128 | 133 | |
| 129 | 134 | $url = add_query_arg( $request_params, self::get_flow_endpoint_url() . $site_id ); |
| 130 | 135 | wcf()->logger->import_log( PHP_EOL . 'Template Import URL: ' . $url . PHP_EOL ); |
| @@ -167,11 +172,16 @@ | ||
| 167 | 172 | * @param string $site_id Template ID of the site. |
| 168 | 173 | * @return array Template data. |
| 169 | 174 | */ |
| 170 | 175 | public static function get_template( $site_id ) { |
| 171 | - $request_params = array( | |
| 172 | - 'licence_args' => self::get_licence_args(), | |
| 173 | - '_fields' => 'id,slug,status,type,link,title,featured_media,template,cartflows_step_page_builder,cartflows_step_type,cartflows_step_flow,featured_image_url,licence_status,flow_type,step_type,page_builder,divi_content,post_meta,content', | |
| 176 | + $request_params = apply_filters( | |
| 177 | + 'cartflows_get_template_params', | |
| 178 | + array( | |
| 179 | + 'licence_args' => self::get_licence_args(), | |
| 180 | + '_fields' => 'id,slug,status,type,link,title,featured_media,template,cartflows_step_page_builder,cartflows_step_type,cartflows_step_flow,featured_image_url,licence_status,flow_type,step_type,page_builder,divi_content,post_meta,content', | |
| 181 | + 'url' => site_url(), | |
| 182 | + 'version' => CARTFLOWS_VER, | |
| 183 | + ) | |
| 174 | 184 | ); |
| 175 | 185 | |
| 176 | 186 | $url = add_query_arg( $request_params, self::get_step_endpoint_url() . $site_id ); |
| 177 | 187 | wcf()->logger->import_log( $url ); |