<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>

<?php   
$amazingaffiliates_notifications = array();

ob_start();
?>

<details open style="border:1px solid lightgray;outline:2px dashed red; background-color: white; text-align: left; width: calc(100% - 70px); padding: 25px; font-size:120%; margin-bottom:5px;" >
    
<summary style="font-size:125%;font-weight:bold;"><span style="color:red;">Pay attention please, APIs are changing, be prepared before May 15th</span></summary>
<p>Start saying bye to the PAAPIs, Amazon is releasing the new Creators' API</p>
<b><big>What changes for us affiliates?</big></b>
<p><i>Technically... not "very" much.</i><br>It's just a rebrand of the old PAAPIs with few minor changes (but these changes have a potentially high impact on your experience).</p>
<ol>
    <li>First, there is a new authetication system, <b>you will need to create new API keys</b> from your Affiliate control panel, the old keys work only with the PA API platform which is being phased out eventually.<br><br></li>
    <li>Second, they are gonna enforce tighter requirements for the use of the APIs the worst of them is <b>the raise of the sales requirement in the last 30 days from 1 to 10</b> (it's a tenfold raise!) <b>to keep the access to the API</b> system. Without the access the APIs will reject every call, ALL product data has to be scraped by hand until you have the requirements again.<br><b> You can manually insert products in the insert page and add all the data thanks to this plugin latest updates.</b><br><br></li>
    <li>Third, they are gonna be more clear (but strict!) with the amount of data you can obtain from the APIs. If you meet the requirements you can do <b>a maximum of 1 call per second</b> (like before) and <b>a maximum of 8640 calls per day</b> (it was uncapped, only throttled after many many calls). These number can be increased slightly with high sale volumes. This means we are gonna say bye bye to frequent price updates of our products. Not a problem if we showcase very few products and in normal times, a little hell with hundred of products and in sales periods like Prime day, black Friday and similars where the price changes hourly<br><br></li>
</ol>
<b><big>When these changes will take place?</big></b>
<p>Since the end of November '25 and that is why some of you are getting errors when retrieving product information (you have the keys as always, but are you meeting the new 30 days sales standard?)<br>The switch off of the old APIs is still unclear. Rumors say end of January '26, we hope its far later than that. EDIT:we finally have a deadline, it's May 15th!</p>
    
</details>

<?php
$amazingaffiliates_notifications["apichange"] = ob_get_clean();

ob_start();
?>

<details style="outline:2px solid #ffd460; background-color: #ffd460; text-align: left; width: calc(100% - 70px); padding: 25px; font-size:120%; margin-bottom:5px;" >
    
<summary style="font-size:125%;font-weight:bold;">Hello! Please read the following <span style="text-decoration:underline;color:#5533ff;">instructions</span> before using the plugin.</summary>
<br>
<div>
    <h2><big><strong>Setting up the Amazon Product APIs</strong></big></h2>
    <ol>
        <li>First of all, you have to set up your Amazon Affiliate PAAPI5 credentials in order to start using the plugin.</li>
        <li>Click the red banner above (the one telling you that the plugin is not set up) or click the <b>"Setup"</b> menu in the navbar</li>
        <li>Now insert the required information (operating Country, Partner Tag, Access Key and Secret Key).<br>
        <i>If you do not know where to find these data, you can find detailed explanations on our <b><a href="/wp-admin/admin.php?page=amazingaffiliates_handbook">FAQ section</a></b>.</i></li>
		<li>After data compilation, hit the <b>"Save"</b> button and wait for a page refresh<br>
		<i>The progress should be at 80% and the plugin is already unlocked but it is recomended to test the APIs before starting.</i></li>
		<li>Hit the <b>"Test the API"</b> button and wait for a successful response</li>
    </ol>

    <big>If all the data was correct, setup is complete you can start enjoying the plugin.<br>
		<i>Otherwise you need to check your Amazon API credentials and retry.</i></big>
</div>
<br>
<div>
    <h2><big><strong>How to insert a product into your website database</strong></big></h2>
    <ol>
        <li>Click the <b>"Insert - Workshop"</b> Button and copy paste the product ASIN or url on the dedicated field.</li>
        <li>Click the <b>"Insert Products"</b> button to create the product block.<br>
        <i>You can insert one or even more products in bulk.</i></li>
        <li>Click the <b>"Clear"</b> Button to clear the data field.</li>
    </ol>
    
    <big>Congratulations! You have now created a product block that can be displayed wherever you like to on your blog post.</big>
</div>
<br>
<div>
    <h2><big><strong>How to insert a product into a post</strong></big></h2>
    <ol>
        <li>Click on the Product ID and it will be automatically copied.</li>
        <li>Now go on the blog post where you want to display the product and use the Gutenberg Block Editor.</li>
        <li>Search for <b>"Amazing Product"</b> Block and select it.</li>
        <li>You will see a control Panel on the right side of the screen where you must insert the Product ID of the product that you want to display.<br>
        <i>If you copied it from the <b>"Insert - Workshop"</b> Section, then you can simply paste it there. Otherwise you can use the search field integrated in the "Amazing Product" Block to find the ID of the product that you'd like to insert.</i></li>
    </ol>
    
    <big>Hit save and preview. Congratulations! Now you can enjoy your post with a beautiful affiliate product block displayed inside!</big>
</div>
<br>
<div>
    <h2><big><strong>How to customize the product information</strong></big></h2>
    <br>
    <strong>Locally, in the post</strong>
    <ol>
        <li>From the Control Panel of the "Amazing Product" Block you can customize the title and description, hide some elements and attach a "wapper" to make the product display even more eye-catching!<br>
        <i>Or you can keep the standard product information from Amazon APIS and adjust the number of bullet lines to be displayed.</i></li>
    </ol>
    <big>Please notice that all these customized information will be displayed on that specific blog post where you decided to insert the product block.</big>
    <br><br>
    <strong>Sitewide, changing the default data displayed</strong>
    <ol>
        <li>On the <b>"Edit- Warehouse"</b> section you can edit the product title and it will become the new "default" title of that product on all the blog posts where that product is inserted.</li>
    </ol>
    <big>Now you should be ready to use the plugin! Thank you for your attention and enjoy!</big>
</div>

<br><br>
<i>P.S.: We would really love to know if you like the plugin! <b>Your opinion is important for us!</b> Please let us know with a <b><a href="https://wordpress.org/plugins/amazingaffiliates/#reviews" target="_blank" rel="noopener">review</a></b>! Thank you for the support!</i>
    
</details>

<?php
$amazingaffiliates_notifications["setup"] = ob_get_clean();