public/wordpress/wp-content/plugins/wp-courseware/includes/controllers/cart.php
/**
	 * Register REST API Cart Endpoints.
	 *
	 * @since 4.3.0
	 *
	 * @return array $ajax_events The array of ajax events.
	 */
Register REST API Cart Endpoints.

@return array $ajax_events The array of ajax events.
Register REST API Cart Endpoints . @return array $ajax_events The array of ajax events .
public function register_cart_ajax_events( $ajax_events ) {
		$cart_ajax_events = array(
			'add-to-cart'      => array( $this, 'ajax_add_to_cart' ),
			'remove-from-cart' => array( $this, 'ajax_remove_from_cart' ),
			'update-cart'      => array( $this, 'ajax_update_cart' ),
		);
		return array_merge( $ajax_events, $cart_ajax_events );
	}
public function register_cart_ajax_events ( $ ajax_events ) { $ cart_ajax_events = array ( 'add-to-cart' => array ( $ this , 'ajax_add_to_cart' ) , 'remove-from-cart' => array ( $ this , 'ajax_remove_from_cart' ) , 'update-cart' => array ( $ this , 'ajax_update_cart' ) , ) ; return array_merge ( $ ajax_events , $ cart_ajax_events ) ; }
Register REST API Cart Endpoints.
Register REST API Cart Endpoints .