-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed: re-factored add_to_cart_on_product_page so quantity and other …
…properties are properly sent.
- Loading branch information
Showing
7 changed files
with
259 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
|
||
/** | ||
* Plausible Analytics | Integrations | ||
* | ||
* @since 2.1.0 | ||
* @package WordPress | ||
* @subpackage Plausible Analytics | ||
*/ | ||
|
||
namespace Plausible\Analytics\WP; | ||
|
||
class Integrations { | ||
const SCRIPT_WRAPPER = '<script defer id="plausible-analytics-integration-tracking">document.addEventListener("DOMContentLoaded", () => { %s });</script>'; | ||
|
||
/** | ||
* Build class. | ||
*/ | ||
public function __construct() { | ||
$this->init(); | ||
} | ||
|
||
/** | ||
* Run available integrations. | ||
* | ||
* @return void | ||
*/ | ||
private function init() { | ||
// WooCommerce | ||
if ( self::is_wc_active() ) { | ||
new Integrations\WooCommerce(); | ||
} | ||
|
||
// Easy Digital Downloads | ||
if ( self::is_edd_active() ) { | ||
// new Integrations\EDD(); | ||
} | ||
} | ||
|
||
/** | ||
* Checks if WooCommerce is installed and activated. | ||
* | ||
* @return bool | ||
*/ | ||
public static function is_wc_active() { | ||
return function_exists( 'WC' ); | ||
} | ||
|
||
/** | ||
* Checks if Easy Digital Downloads is installed and activated. | ||
* | ||
* @return bool | ||
*/ | ||
public static function is_edd_active() { | ||
return function_exists( 'EDD' ); | ||
} | ||
} |
Oops, something went wrong.