JS_Config::get_data()

Summary

No summary available.

Source

File: src/BigCommerce/Assets/Admin/JS_Config.php

	public function get_data() {
		if ( ! isset( $this->data ) ) {
			$this->data = [
				'images_url'                 => $this->directory . 'img/admin/',
				'icons_url'                  => $this->directory . 'img/admin/icons',
				'categories'                 => Product_Category::NAME,
				'flags'                      => Flag::NAME,
				'brands'                     => Brand::NAME,
				'recent'                     => __( 'recent', 'bigcommerce' ),
				'search'                     => __( 'search', 'bigcommerce' ),
				'sort_order'                 => __( 'order', 'bigcommerce' ),
				'admin_ajax'                 => admin_url( 'admin-ajax.php' ),
				'account_rest_nonce'         => wp_create_nonce( Account_Status::STATUS_AJAX ),
				'account_rest_action'        => Account_Status::STATUS_AJAX,
				'diagnostics_ajax_nonce'     => wp_create_nonce( Troubleshooting_Diagnostics::AJAX_ACTION ),
				'diagnostics_ajax_action'    => Troubleshooting_Diagnostics::AJAX_ACTION,
				'diagnostics_section'        => Troubleshooting_Diagnostics::NAME,
				'product_import_ajax_nonce'  => wp_create_nonce( Import_Status::AJAX_ACTION_IMPORT_STATUS ),
				'product_import_ajax_action' => Import_Status::AJAX_ACTION_IMPORT_STATUS,
			];

			/**
			 * Filters admin js config object.
			 *
			 * @param array $data Js config data.
			 */
			$this->data = apply_filters( 'bigcommerce/admin/js_config', $this->data );
		}

		return $this->data;
	}


User Contributed Notes

You must log in before being able to contribute a note or feedback.